?????????python??????Щ??wooyun??????????……
???????????????????wooyun????б??????б?????????url?????????????????????????????г???url??
?????????е?bug??????2??url???????????????????y?????????bestcoding??????????????????С??????????????????С?????п????????á????????????????
#coding:utf-8
import urllib
import urllib2
import re??sys
import bestcoding
import time
def wooyun():
for i in range(1??800):
page=str(i)
vullist='http://www.wooyun.org/bugs/page/'+page
vulpage=urllib2.urlopen(vullist).read()
p=re.compile(r'bugs/.*d{6}')
for bugpath in p.findall(vulpage):
try:
time.sleep(1)
bugurl="http://www.wooyun.org/"+bugpath
bugpage=urllib2.urlopen(bugurl).read()
bugzt=bugpage.find("??????????")
if bugzt>0:
print bugurl
else:
pass
except:
print "Url error"
if __name__=='__main__':
wooyun()
????????????????????
def getCodeStr(result):
#gb2312
try:
myResult=result.decode('gb2312').encode('gbk'??'ignore')
return myResult
except:
pass
#utf-8
try:
myResult=result.decode('utf-8').encode('gbk'??'ignore')
return myResult
except:
pass
#unicode
try:
myResult=result.encode('gbk'??'ignore')
return myResult
except:
pass
#gbk
try:
myResult=result.decode('gbk').encode('gbk'??'ignore')
return myResult
except:
pass
#big5
try:
myResult=result.decode('big5').encode('gbk'??'ignore')
return myResult
except:
pass