Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Provide it a list of domains and it will show you which of them is 200 OK or 404 NOT FOUND (extremly helpful for web application bug hunting)
#!/usr/bin/env python
import requests
read_file = open(input("Enter path of the file containing subdomains: "),'r')
for host in read_file:
domain = host.rstrip("\n")
page = requests.get('http://'+ domain, timeout=20)
print ('Status Code: ',page.status_code,' for the Domain: ', domain)
print ('Status Code: Not found for the Domain: ',domain ) #It means that the webpage can't be reached.
print('File not found')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment