Skip to content

Instantly share code, notes, and snippets.

@gingeleski
Created January 16, 2021 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gingeleski/cd2578837c420333b626fab41dcb86ae to your computer and use it in GitHub Desktop.
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.
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