Skip to content

Instantly share code, notes, and snippets.

@Mad-robot
Forked from si9int/c99-nl.py
Created July 11, 2020 18:43
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 Mad-robot/0119d970210c74734d530562fbe762a8 to your computer and use it in GitHub Desktop.
Save Mad-robot/0119d970210c74734d530562fbe762a8 to your computer and use it in GitHub Desktop.
Automates https://subdomainfinder.c99.nl | Usage: python3 c99-nl.py <domain.com> | Requirements: pip3 install bs4
#!/usr/bin/env python3
# v.0.3 | twitter.com/si9int
import requests, sys
from bs4 import BeautifulSoup as bs
domain = sys.argv[1]
subdomains = []
def get_csrf_params():
csrf_params = {}
data = requests.get('https://subdomainfinder.c99.nl/').text
html = bs(data, 'html.parser').find('div', {'class' : 'input-group'})
for c in html.find_all('input'):
try:
csrf_params[c.get('name')] = c.get('value')
except:
pass
return csrf_params
params = get_csrf_params()
params['CSRF984348618797932'] = params['CSRF984348797932']
# Additional options
params['scan_subdomains'] = ''
params['domain'] = domain
params['privatequery'] = 'on'
data = requests.post('https://subdomainfinder.c99.nl/', data=params).text
print(data)
html = bs(data, 'html.parser').find('table', {'id' : 'result_table'})
for tr in html.find_all('tr'):
try:
subdomains.append(tr.find('a').text)
except:
pass
for s in subdomains:
print(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment