抓取CNVD漏洞CMS厂商列表

脚本摘自某大佬博客,抓取CNVD漏洞CMS厂商列表,获取到对应的CMS类型,方便查找和进行代码审计。截止目前,已经获取到 763 种CMS类型。

代码如下:

# title: 抓取 CNVD 漏洞 CMS 厂商列表
import requests
import re

#refer:http://www.cnvd.org.cn/asset/selectedManuList?offset=60&max=10&manuName=cms

#全局变量
keyword = 'cms'  #用于获取厂商的关键词
main_url = 'http://www.cnvd.org.cn/asset/selectedManuList?max=2000&manuName='+keyword
header = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36',
          'Referer':'http://www.cnvd.org.cn'
          }
req = requests.Session()

#获取网页
html = req.get(main_url,headers = header,timeout=10)
html.encoding = 'utf-8'
guize = r"bringBack\('(.*?)\'\)"
try:
    factories = re.findall(guize,html.text)
except Exception as e:
    print(e)

f = open("factories.html", 'w+',encoding='utf-8')
for i in factories:
    print(i,file=f)
f.close()
print('OK!请检查当前目录下 factories.html')

运行截图:

发表评论

发表评论

*

沙发空缺中,还不快抢~