intelmq.bots.parsers.zoneh package

Submodules

intelmq.bots.parsers.zoneh.parser module

ZoneH CSV defacement report parser

intelmq.bots.parsers.zoneh.parser.BOT

alias of intelmq.bots.parsers.zoneh.parser.ZoneHParserBot

class intelmq.bots.parsers.zoneh.parser.ZoneHParserBot(bot_id: str, start: bool = False, sighup_event=None, disable_multithreading: bool = None)

Bases: intelmq.lib.bot.ParserBot

Parse the ZoneH CSV feed

parse(report: intelmq.lib.message.Report)

A basic CSV Dictionary parser.

parse_line(row, report)
recover_line(line: typing.Union[str, NoneType] = None) → str

Reverse of “parse” for single lines.

Recovers a fully functional report with only the problematic line by concatenating all strings in “self.tempdata” with “line” with LF newlines. Works fine for most text files.

line : Optional[str], optional
The currently process line which should be transferred into it’s original appearance. As fallback, “self._current_line” is used if available (depending on self.parse). The default is None.
ValueError
If neither the parameter “line” nor the member “self._current_line” is available.
str
The reconstructed raw data.

Module contents