Last active
April 20, 2024 21:28
-
-
Save si9int/dce435633f49209150a780af4b3e768d 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
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
#!/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
Same Error:
Traceback (most recent call last):
File "c99-nl.py", line 24, in
params['CSRF984348618797932'] = params['CSRF984348797932']
KeyError: 'CSRF984348797932'