fix: Add parser for feodotracker

pull/12/head
Raphaël Vinot 2018-12-12 17:44:06 +01:00
parent 69d00e2328
commit b6ca96d147
2 changed files with 14 additions and 1 deletions

View File

@ -3,5 +3,5 @@
"vendor": "feodotracker",
"name": "ipblocklist",
"impact": 5,
"parser": ".parsers.abusech"
"parser": ".parsers.abusech_feodo"
}

View File

@ -0,0 +1,13 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from dateutil.parser import parse
import re
from io import BytesIO
from typing import List
def parse_raw_file(self, f: BytesIO) -> List[bytes]:
self.datetime = parse(re.findall(b'# Last updated: (.*)#\n', f.getvalue())[0])
return self.extract_ipv4(f.getvalue())