API

Scan Object

class direnumerate.Scan(url: str)[source]

A class to perform directory and port scanning on a given URL.

dirs(wordlist_file: str, return_only_found: bool = False, verbose: bool = False, log: bool = False) list[source]

Initializes the Scan object with the given URL. The URL is validated and adjusted to use HTTPS if needed.

Args:

url (str): The target URL to scan.

Raises:

DirenumerateError: If the URL argument is missing or incorrect.

ports(ports: list, log: bool = False) list[source]

Scans the specified ports for the given URL.

Args:

ports (list): A list of ports to scan. log (bool, optional): If True, writes output to direnumerate.log file. Defaults to False.

Returns:

list: A list of scan results for the specified ports.