synopsis:Specialized ptp.libptp.parser.AbstractParser classes for the tool W3AF.
class ptp.tools.w3af.parser.W3AFXMLParser(pathname, filename='*.xml', light=False, first=True)[source]

W3AF XML specialized parser.

__tool__ = 'w3af'
__format__ = 'xml'
__version__ = '1\\.[0-9]+(\\.[0-9]+)?'

Parse the captured http transactions of the report.

Parameters:raw_transactions (str) – HTTP transactions logged by w3af
Returns:List of dicts where each one has a request and response.
Return type:list
classmethod is_mine(pathname, filename='*.xml', light=False, first=True)[source]

Check if it can handle the report file.

  • 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).
  • IOError – when the report file cannot be found.
  • OSError – when the report file cannot be found.

True if it supports the report, False otherwise.

Return type:



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 the results of the report.

Returns:List of dicts where each one represents a discovery.
Return type:list