Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Writes a line-delimited .txt list of base URLs for bug bounty targets.
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