-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
46 lines (33 loc) · 1.07 KB
/
main.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
#!/usr/bin/python3
"""
author : sadeceben
github : https://github.com/sadeceben?tab=repositories
"""
import requests
import sys
import time
def main(urls , wordlist):
n = time.time()
r_file = open(str(wordlist))
url = str(urls)
header = {'User-Agent':'Mozilla/5.0 (Android 4.3; Tablet; rv:50.0) Gecko/50.0 Firefox/50.0'}
try:
r = requests.get(url, headers=header)
if r.status_code != 200:
print("Host not found")
exit
else:
print("Host Connected")
for w in r_file:
n_url = url + "/" + w.replace("\n","")
res = requests.get(n_url, headers=header)
if res.status_code == 200:
print("200: " + url + "/" + w.replace("\n",""))
r_file.close()
except Exception as e:
print(e)
r_file.close()
l = time.time()
print("Elapsed Time : " + str(l-n))
if __name__ == '__main__':
main( sys.argv[1] , sys.argv[2] )