新手学python系列之那些年wooyun忽略的漏洞们……
  程序执行完会整理出wooyun漏洞列表中所有被忽略的漏洞url,无奈正则太菜,没整理出漏洞标题,只列出了url。
  程序还有点bug,会打印2次url,不知道原因所在,也懒得解决了。其中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