intelmq.bots.parsers.cznic package

Submodules

intelmq.bots.parsers.cznic.parser_haas module

intelmq.bots.parsers.cznic.parser_haas.BOT

alias of intelmq.bots.parsers.cznic.parser_haas.CZNICHaasParserBot

class intelmq.bots.parsers.cznic.parser_haas.CZNICHaasParserBot(bot_id: str, start: bool = False, sighup_event=None, disable_multithreading: Optional[bool] = None)

Bases: intelmq.lib.bot.ParserBot

CZ.NIC HaaS Parser is the bot responsible to parse the report and sanitize the information

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

A basic JSON parser. Assumes a list of objects as input to be yield.

parse_line(line, report)

A generator which can yield one or more messages contained in line.

Report has the full message, thus you can access some metadata. Override for your use.

recover_line(line: dict) str

Reverse of parse for JSON pulses.

Recovers a fully functional report with only the problematic pulse.

intelmq.bots.parsers.cznic.parser_proki module

intelmq.bots.parsers.cznic.parser_proki.BOT

alias of intelmq.bots.parsers.cznic.parser_proki.CZNICProkiParserBot

class intelmq.bots.parsers.cznic.parser_proki.CZNICProkiParserBot(bot_id: str, start: bool = False, sighup_event=None, disable_multithreading: Optional[bool] = None)

Bases: intelmq.lib.bot.ParserBot

Parse the feed from malicious IP addresses on Czech networks

parse(report)

A generator yielding the single elements of the data.

Comments, headers etc. can be processed here. Data needed by self.parse_line can be saved in self.tempdata (list).

Default parser yields stripped lines. Override for your use or use an existing parser, e.g.:

parse = ParserBot.parse_csv
You should do that for recovering lines too.

recover_line = ParserBot.recover_line_csv

parse_line(line, report)

A generator which can yield one or more messages contained in line.

Report has the full message, thus you can access some metadata. Override for your use.

recover_line(line: dict) str

Reverse of parse for JSON pulses.

Recovers a fully functional report with only the problematic pulse.

Module contents