DirBuster

Parser

synopsis:Specialized ptp.libptp.parser.AbstractParser classes for the tool DirBuster.
class ptp.tools.dirbuster.parser.DirbusterParser(pathname, filename='DirBuster-Report*', light=False, first=True)[source]

DirBuster specialized parser.

__tool__ = 'dirbuster'
__format__ = 'dirbuster'
__version__ = ['1.0-RC1']
__init__(pathname, filename='DirBuster-Report*', light=False, first=True)[source]

Initialize DirbusterParser.

Parameters:
  • pathname (str) – Path to the report directory.
  • filename (str) – Regex matching the report file.
  • first (bool) – Only process first file (True) or each file that matched (False).
classmethod is_mine(pathname, filename='DirBuster-Report*', 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).
Raises:
  • IOError – when the report file cannot be found.
  • OSError – when the report file cannot be found.
Returns:

True if it supports the report, False otherwise.

Return type:

bool

parse_metadata()[source]

Parse the metadata of the report.

Returns:The metadata of the report.
Return type:dict
parse_report()[source]

Parser the results of a DirBuster report.

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

Signatures

synopsis:DirBuster does not provide ranking for the vulnerabilities it has found. This file tries to define a ranking for every DirBuster’s discoveries it might find.
ptp.tools.dirbuster.signatures.DIRECTORIES = {'.*/manager/html/.*': 2, '.*/admin/.*': 2, '.*/conf/server.xml/.*': 2, '.*/phpmyadmin/.*': 2, '.*/phpMyAdmin/.*': 2}
Data:dict of the directories with their rank.
ptp.tools.dirbuster.signatures.FILES = {'.*/config\\.php': 4, '.*/c99\\.php': 4, '.*/c99shell\\.php': 4, '.*/r57\\.php': 4, '.*/r58\\.php': 4, '.*/dra\\.php': 4, '.*/cmd\\.php': 4, '.*/cmd\\.asp': 4, '.*/\\.htaccess': 4, '.*/\\.htpasswd': 4, '.*/phpinfo\\.php': 2, '.*/info\\.php': 2, '.*/php\\.ini': 2, '.*/WEB-INF/web\\.xml': 2, '.*/jmx-console': 2, '.*/web-console': 2, '.*/web-console/Invoker': 2, '.*/invoker/JMXInvokerServlet': 2, '.*/server-info': 1, '.*/server-status': 1, '.*/status': 1}
Data:dict of the files with their rank.