intelmq.bots.parsers.zoneh package — intelmq 2.3.3.alpha1 documentation

# 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: Optional[bool] = None)

  Bases: `intelmq.lib.bot.ParserBot`

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

    A basic CSV Dictionary parser.

  `parse_line`(row, 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: Optional[str] = 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.

    lineOptional[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