Saint.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:VIA4CVE 作者: cve-search 项目源码 文件源码
def __init__(self):
    self.name = SOURCE_NAME
    parser    = make_parser()
    handler = SaintHandler()
    _file, r = conf.getFeedData(SOURCE_NAME, SOURCE_FILE)
    parser.setContentHandler(handler)
    parser.parse(BytesIO(_file))
    self.cves   = defaultdict(list)
    self.bids   = defaultdict(list)
    self.osvdbs = defaultdict(list)
    for exploit in handler.exploits:
      data = copy.copy(exploit)
      if data.get('cve'): data.pop('cve')
      if exploit.get('cve'):   self.cves[  exploit['cve']  ].append(data)
      if exploit.get('bid'):   self.bids[  exploit['bid']  ].append(data)
      if exploit.get('osvdb'): self.osvdbs[exploit['osvdb']].append(data)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号