Created
January 16, 2021 18:38
-
-
Save gingeleski/cd2578837c420333b626fab41dcb86ae to your computer and use it in GitHub Desktop.
Writes a line-delimited .txt list of base URLs for bug bounty targets.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import requests | |
exhaustive_bug_bounty_targets = [] | |
output_filepath = 'exhaustive_bug_bounty_targets.txt' | |
# Grab however many individual big lists there are in GitHub:BugBountyResources/targets | |
idx = 0 | |
while True: | |
res = requests.get('https://raw.githubusercontent.com/BugBountyResources/targets/main/all_' + str(idx) + '.txt') | |
if res.status_code != 200: | |
break | |
else: | |
idx += 1 | |
exhaustive_bug_bounty_targets.extend(res.text.split('\n')) | |
if os.path.exists(output_filepath): | |
os.remove(output_filepath) | |
with open(output_filepath, 'a', encoding='utf8') as output_file: | |
for target in exhaustive_bug_bounty_targets: | |
if len(target.strip()) == 0: | |
continue | |
this_line = 'http://' + target | |
output_file.write(this_line + '\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment