-
Notifications
You must be signed in to change notification settings - Fork 1
/
statuscheck.py
48 lines (38 loc) · 1.56 KB
/
statuscheck.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import os
import requests
import argparse
import concurrent.futures
print("\n")
print("""
╦ ╦╔╦╗╔╦╗╔═╗╔═╗┌┬┐┌─┐┌┬┐┬ ┬┌─┐╔╦╗┌─┐┌─┐┌┬┐┌─┐┬─┐
╠═╣ ║ ║ ╠═╝╚═╗ │ ├─┤ │ │ │└─┐ ║ ├┤ └─┐ │ ├┤ ├┬┘
╩ ╩ ╩ ╩ ╩ ╚═╝ ┴ ┴ ┴ ┴ └─┘└─┘ ╩ └─┘└─┘ ┴ └─┘┴└─
A Script to automate your Subdomain Recon Organization Process
Author: @xYantix
""")
print("\n")
parser = argparse.ArgumentParser()
parser.add_argument('-list', '-l', required=True, help='Enter path for domain/subdomain list')
parser.add_argument('-threads', '-t', required=False, default=10, help='Enter threads - Default is 10')
#Can add additional args later - custom headers
args = parser.parse_args()
urllist = args.list
threadcount = args.threads
urls = open(urllist, 'r')
def statuscheck(url):
try:
response = requests.get(url.strip(), timeout=1)
status = response.status_code
print ("Response ==> " + "[" + str(status) + "] " + url.strip())
outfile = open(f"{status}.txt","a")
outfile.write(url)
except Exception:
pass
with concurrent.futures.ThreadPoolExecutor(max_workers=int(threadcount)) as executor:
checks = {executor.submit(statuscheck, url): url for url in urls}
for future in concurrent.futures.as_completed(checks):
url = checks[future]
try:
data = future.result()
except Exception as exc:
pass