WPScan Output Parser Python library documentation.
The python module exposes helper methods and Parser objects to parse WPScan results as your convevnience.
Exemples
Using helper method parse_results_from_file. Return all results as a simple dictionnary.
import pprint from wpscan_out_parse import parse_results_from_file results = parse_results_from_file('./test/output_files/wordpress_many_vuln.json') pprint.pprint(results)
Using WPScanJsonParser object.
import json import pprint from wpscan_out_parse import WPScanJsonParser with open('./test/output_files/wordpress_one_vuln.json', 'r') as wpscan_out: parser = WPScanJsonParser(json.load(wpscan_out)) pprint.pprint(parser.get_warnings())
| Module | formatter |
No module docstring; 4/6 functions documented |
| Package | parser |
Undocumented |
| Module | __main__ |
Undocumented |
From the __init__.py module:
| Variable | VERSION |
Undocumented |
| Class | WPScanCliParser |
Main interface to parse WPScan CLI output. |
| Class | WPScanJsonParser |
Main interface to parse WPScan JSON data |
| Function | format_results |
Format the results dict into a "html", "cli" or "json" string. |
| Function | parse_results_from_file |
Parse any WPScan output file. |
| Function | parse_results_from_string |
Parse any WPScan output string. |
Parse any WPScan output string.
Return the results as dict object like
{
'infos':[],
'warnings':[],
'alerts':[],
'summary':{
'table':[
{
'Component': None,
'Version': None,
'Version State': None,
'Vulnerabilities': None,
'Status': None
},
...
],
'line':'WPScan result summary: alerts={}, warnings={}, infos={}, error={}'
},
'error':None
}
(summary table is only parsed for JSON files)
| Parameters | wpscan_output_string | Undocumented (type: str) |
| false_positives_strings | Undocumented (type: Optional[Sequence[str]]) | |
| show_all_details | Undocumented (type: bool) | |
| Returns | Undocumented (type: WPScanResults) | |
Parse any WPScan output file.
Return the results as dict object.
See parse_results_from_string.
| Parameters | wpscan_output_file | Undocumented (type: str) |
| false_positives_strings | Undocumented (type: Optional[Sequence[str]]) | |
| show_all_details | Undocumented (type: bool) | |
| Returns | Undocumented (type: WPScanResults) | |
Format the results dict into a "html", "cli" or "json" string.
"html", "cli" or "json"| Parameters | results | Undocumented (type: Dict[str, Any]) |
| format | Undocumented (type: str) | |
| warnings | Undocumented (type: bool) | |
| infos | Undocumented (type: bool) | |
| nocolor | Undocumented (type: bool) | |
| Returns | Undocumented (type: str) | |