diff --git a/autorecon/config.py b/autorecon/config.py index f981b1c..b6fc811 100644 --- a/autorecon/config.py +++ b/autorecon/config.py @@ -16,7 +16,7 @@ configurable_keys = [ 'output', 'single_target', 'only_scans_dir', - 'create_port_dirs', + 'no_port_dirs', 'heartbeat', 'timeout', 'target_timeout', @@ -33,7 +33,7 @@ configurable_keys = [ configurable_boolean_keys = [ 'single_target', 'only_scans_dir', - 'create_port_dirs', + 'no_port_dirs', 'proxychains', 'disable_sanity_checks', 'accessible' @@ -56,11 +56,11 @@ config = { 'output': 'results', 'single_target': False, 'only_scans_dir': False, - 'create_port_dirs': False, + 'no_port_dirs': False, 'heartbeat': 60, 'timeout': None, 'target_timeout': None, - 'nmap': '-vv --reason -Pn', + 'nmap': '-vv --reason -Pn -T4', 'nmap_append': '', 'proxychains': False, 'disable_sanity_checks': False, diff --git a/autorecon/config.toml b/autorecon/config.toml index a9df31d..c09dff8 100644 --- a/autorecon/config.toml +++ b/autorecon/config.toml @@ -1,7 +1,6 @@ # Configure regular AutoRecon options at the top of this file. -create-port-dirs = true -nmap-append = '-T4' +# nmap-append = '-T3' # verbose = 1 # max-scans = 30 diff --git a/autorecon/main.py b/autorecon/main.py index 6a92a55..418cae0 100644 --- a/autorecon/main.py +++ b/autorecon/main.py @@ -17,7 +17,7 @@ from autorecon.io import slugify, e, fformat, cprint, debug, info, warn, error, from autorecon.plugins import Pattern, PortScan, ServiceScan, Report, AutoRecon from autorecon.targets import Target, Service -VERSION = "2.0.7" +VERSION = "2.0.8" if not os.path.exists(config['config_dir']): shutil.rmtree(config['config_dir'], ignore_errors=True, onerror=None) @@ -278,7 +278,7 @@ async def service_scan(plugin, service): port = service.port name = service.name - if config['create_port_dirs']: + if not config['no_port_dirs']: scandir = os.path.join(scandir, protocol + str(port)) os.makedirs(scandir, exist_ok=True) os.makedirs(os.path.join(scandir, 'xml'), exist_ok=True) @@ -517,7 +517,7 @@ async def scan_target(target): protocol = service.protocol port = service.port - if config['create_port_dirs']: + if not config['no_port_dirs']: scandir = os.path.join(scandir, protocol + str(port)) os.makedirs(scandir, exist_ok=True) os.makedirs(os.path.join(scandir, 'xml'), exist_ok=True) @@ -789,7 +789,7 @@ async def run(): parser.add_argument('-o', '--output', action='store', help='The output directory for results. Default: %(default)s') parser.add_argument('--single-target', action='store_true', help='Only scan a single target. A directory named after the target will not be created. Instead, the directory structure will be created within the output directory. Default: %(default)s') parser.add_argument('--only-scans-dir', action='store_true', help='Only create the "scans" directory for results. Other directories (e.g. exploit, loot, report) will not be created. Default: %(default)s') - parser.add_argument('--create-port-dirs', action='store_true', help='Create directories for ports within the "scans" directory (e.g. scans/tcp80, scans/udp53) and store results in these directories. Default: %(default)s') + parser.add_argument('--no-port-dirs', action='store_true', help='Don\'t create directories for ports (e.g. scans/tcp80, scans/udp53). Instead store all results in the "scans" directory itself. Default: %(default)s') parser.add_argument('--heartbeat', action='store', type=int, help='Specifies the heartbeat interval (in seconds) for scan status messages. Default: %(default)s') parser.add_argument('--timeout', action='store', type=int, help='Specifies the maximum amount of time in minutes that AutoRecon should run for. Default: %(default)s') parser.add_argument('--target-timeout', action='store', type=int, help='Specifies the maximum amount of time in minutes that a target should be scanned for before abandoning it and moving on. Default: %(default)s') diff --git a/autorecon/targets.py b/autorecon/targets.py index 014ef71..f07f959 100644 --- a/autorecon/targets.py +++ b/autorecon/targets.py @@ -134,7 +134,7 @@ class Service: port = self.port name = self.name - if config['create_port_dirs']: + if not config['no_port_dirs']: scandir = os.path.join(scandir, protocol + str(port)) os.makedirs(scandir, exist_ok=True) os.makedirs(os.path.join(scandir, 'xml'), exist_ok=True) diff --git a/pyproject.toml b/pyproject.toml index be9a8ce..4230b69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "autorecon" -version = "2.0.7" +version = "2.0.8" description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services." authors = ["Tib3rius"] license = "GNU GPL v3"