class documentation

class WPScanJsonParser(Parser): (source)

View In Hierarchy

Main interface to parse WPScan JSON data

  • data: The JSON structure of the WPScan output.
  • false_positives_strings: List of false positive strings.
  • show_all_details: Boolean, enable to show all wpscan infos (found by, confidence, etc).

All objects implements get_alerts(), get_warnings() and get_infos()

Method __init__ Parser config: false positives string and verbosity (not available with cli parser)
Instance Variable components Undocumented
Instance Variable version Undocumented
Instance Variable main_theme Undocumented
Instance Variable plugins Undocumented
Instance Variable themes Undocumented
Instance Variable interesting_findings Undocumented
Instance Variable timthumbs Undocumented
Instance Variable db_exports Undocumented
Instance Variable users Undocumented
Instance Variable medias Undocumented
Instance Variable config_backups Undocumented
Instance Variable vuln_api Undocumented
Instance Variable password_attack Undocumented
Instance Variable not_fully_configured Undocumented
Instance Variable banner Undocumented
Instance Variable scan_started Undocumented
Instance Variable scan_finished Undocumented
Method get_infos Get all infos from all components and add false positives as infos with "[False positive]" prefix
Method get_warnings Get all warnings from all components and igore false positives and automatically remove special warning if all vuln are ignored
Method get_alerts Get all alerts from all components and igore false positives
Method get_results Returns a dictionnary structure like
Method get_core_findings Get only core findings. Core findings appears in the table summary.
Method get_summary_list Return a list of dict with all plugins, vuls, and statuses.
Method get_error Return any error or None if no errors
Instance Variable _parser_config Undocumented
Instance Variable _error Undocumented
Method _init_component_dict Undocumented
Method _init_component_list Undocumented
Method _init_component If pass_all_data is True: name is only used to check if the new component should be created. Then it passes all self.data dict to the child constructor.

Inherited from Parser:

Method get_summary_line Return the summary string in one line

Inherited from Component (via Parser):

Instance Variable data Initial data.
Instance Variable false_positives_strings Undocumented
Instance Variable show_all_details Undocumented
Method is_false_positive False Positive Detection
def __init__(self, data, false_positives_strings=None, show_all_details=False): (source)
Parser config: false positives string and verbosity (not available with cli parser)
ParametersdataUndocumented (type: Dict[str, Any])
false_positives_stringsUndocumented (type: Optional[Sequence[str]])
show_all_detailsUndocumented (type: bool)
_parser_config = (source)

Undocumented

components = (source)

Undocumented

(type: List[Component])
version = (source)

Undocumented

(type: Optional[WordPressVersion])
main_theme = (source)

Undocumented

(type: Optional[MainTheme])
plugins = (source)

Undocumented

(type: Sequence[Plugin])
themes = (source)

Undocumented

(type: Sequence[Theme])
interesting_findings = (source)

Undocumented

(type: Sequence[InterestingFinding])
timthumbs = (source)

Undocumented

(type: Sequence[Timthumb])
db_exports = (source)

Undocumented

(type: Sequence[DBExport])
users = (source)

Undocumented

(type: Sequence[User])
medias = (source)

Undocumented

(type: Sequence[Media])
config_backups = (source)

Undocumented

(type: Sequence[ConfigBackup])
vuln_api = (source)

Undocumented

(type: Optional[VulnAPI])
password_attack = (source)

Undocumented

(type: Optional[PasswordAttack])
not_fully_configured = (source)

Undocumented

(type: Optional[NotFullyConfigured])
banner = (source)

Undocumented

(type: Optional[Banner])
scan_started = (source)

Undocumented

(type: Optional[ScanStarted])
scan_finished = (source)

Undocumented

(type: Optional[ScanFinished])
_error = (source)

Undocumented

def _init_component_dict(self, name, comp_type, comp_filter=(lambda slug: True)): (source)

Undocumented

ParametersnameUndocumented (type: str)
comp_typeUndocumented (type: Union[Type[_PrincipalSlugComponent], Type[_OtherSlugComponent]])
comp_filterUndocumented (type: Callable[[str], bool])
ReturnsUndocumented (type: Sequence[Union[_PrincipalSlugComponent, _OtherSlugComponent]])
def _init_component_list(self, name, comp_type): (source)

Undocumented

ParametersnameUndocumented (type: str)
comp_typeUndocumented (type: Type[_NoSlugComponent])
ReturnsUndocumented (type: Sequence[Any])
def _init_component(self, name, comp_type, pass_all_data=False): (source)
If pass_all_data is True: name is only used to check if the new component should be created.
Then it passes all self.data dict to the child constructor.
ParametersnameUndocumented (type: str)
comp_typeUndocumented (type: Type[_NoSlugComponent])
pass_all_dataUndocumented (type: bool)
ReturnsUndocumented (type: Optional[Any])
def get_infos(self): (source)
Get all infos from all components and add false positives as infos with "[False positive]" prefix
ReturnsUndocumented (type: Sequence[str])
def get_warnings(self): (source)
Get all warnings from all components and igore false positives and automatically remove special warning if all vuln are ignored
ReturnsUndocumented (type: Sequence[str])
def get_alerts(self): (source)
Get all alerts from all components and igore false positives
ReturnsUndocumented (type: Sequence[str])
def get_results(self): (source)

Returns a dictionnary structure 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
}
ReturnsUndocumented (type: WPScanResults)
def get_core_findings(self): (source)
Get only core findings. Core findings appears in the table summary.
ReturnsUndocumented (type: Sequence[_CoreFinding])
def get_summary_list(self): (source)
Return a list of dict with all plugins, vuls, and statuses.
ReturnsUndocumented (type: List[WPScanResultsSummaryRow])
def get_error(self): (source)
Return any error or None if no errors
ReturnsUndocumented (type: Optional[str])
API Documentation for WPScan Output Parser, generated by pydoctor 21.2.2 at 2021-04-12 15:55:36.