forked from themycode/python-hacker-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoute.py
More file actions
49 lines (43 loc) · 1.45 KB
/
Route.py
File metadata and controls
49 lines (43 loc) · 1.45 KB
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
49
import requests
import threading
import os
xj=open('save.txt','w')
xj.close()
oklist=[]
notlist=[]
def route(files,url):
guolist=['404','Error','Not Found','500','error','360','Hacking','安全狗','防火墙','云锁','违法','无权限','403','D盾']
urls=url+files
headers={'user-aget':'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
reqt=requests.get(url=urls,headers=headers,timeout=10)
for g in guolist:
if not g in reqt.content.decode('utf-8'):
ok='[+] (status_code:{}|url:{})'.format(reqt.status_code,reqt.url)
if ok in oklist:continue
oklist.append(ok)
else:
no='[-] >>> status_code:{}|url:{}'.format(reqt.status_code,reqt.url)
if no in notlist:continue
notlist.append(no)
if len(notlist)==0:
for y in oklist:
print(y)
print(y,file=open('save.txt','a'))
else:
for n in notlist:
print(n)
if __name__ == '__main__':
while True:
us=input('dict:')
if os.path.exists(us):
print('[+] open {} ok !'.format(us))
break
else:
print('[-] not {}'.format(us))
continue
urs=input('url:')
dk=open('{}'.format(us),'r')
for r in dk.readlines():
qc="".join(r.split('\n'))
t=threading.Thread(target=route,args=(qc,urs.rstrip('/')))
t.start()