程序執行完會整理出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 |
English » | | | | | | | | |
Text-to-speech function is limited to 100 characters