Hoppy

Parser

synopsis:Specialized ptp.libptp.parser.AbstractParser classes for the tool Hoppy.
class ptp.tools.hoppy.parser.HoppyParser(pathname, filename='*.spider', **kwargs)[source]

Hoppy specialized parser.

__tool__ = 'hoppy'
__format__ = None
__version__ = '1\\.[0-9]+(\\.[0-9]+)?'
__init__(pathname, filename='*.spider', **kwargs)[source]

Initialize HoppyParser.

Parameters:
  • pathname (str) – Path to the report directory.
  • filename (str) – Regex matching the report file.
classmethod is_mine(pathname, filename='*.summary', light=False, first=True)[source]

Check if it can handle the report file.

Parameters:
  • pathname (str) – Path to the report directory.
  • filename (str) – Regex matching the report file.
  • light (bool) – True to only parse the ranking of the findings from the report.
  • first (bool) – Only process first file (True) or each file that matched (False).
Returns:

True if it supports the report, False otherwise.

Return type:

bool

parse_metadata()[source]

Parse the metadata of the report.

Raises:NotSupportedVersionError – if it does not support the version of this report.
Returns:The metadata of the report.
Return type:dict
parse_report()[source]

Parse the results of the report.

Returns:List of dicts where each one has a request and response.
Return type:list