-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebscan.py
More file actions
36 lines (35 loc) · 1.39 KB
/
webscan.py
File metadata and controls
36 lines (35 loc) · 1.39 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
# -*- coding: utf-8 -*-
'''
Author=yanyun
Email=yanyuneternal@163.com
'''
import httplib
def Scanweb(web):
if web.__len__() == 0 :
print "Website is required"
return
website = web
#login path
dirs = ["admin","login","admin_index","admin/admin","admin/login","admin/index","admin/user"]
for line in dirs:
conn = httplib.HTTPConnection(website)
conn.request('GET','/'+line)
r1 = conn.getresponse()
if r1.status == 200 or r1.status == 301:
print "********************************Great get something*************************************"
print website+'/'+line,r1.status,r1.reason
conn.close()
conn = httplib.HTTPConnection(website)
conn.request('GET','/'+line+'.asp')
r1 = conn.getresponse()
if r1.status == 200 or r1.status == 301:
print "********************************Great get something*************************************"
print website+'/'+line+'.asp',r1.status,r1.reason
conn.close()
conn = httplib.HTTPConnection(website)
conn.request('GET','/'+line+'.php')
r1 = conn.getresponse()
if r1.status == 200 or r1.status == 301:
print "********************************Great get something*************************************"
print website+'/'+line+'.php',r1.status,r1.reason
conn.close()