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)
评论列表
文章目录