diff --git a/autorecon/main.py b/autorecon/main.py index 95eac2e..a3a4d15 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.23" +VERSION = "2.0.24" if not os.path.exists(config['config_dir']): shutil.rmtree(config['config_dir'], ignore_errors=True, onerror=None) diff --git a/autorecon/plugins.py b/autorecon/plugins.py index e0dd71b..222de4f 100644 --- a/autorecon/plugins.py +++ b/autorecon/plugins.py @@ -49,13 +49,21 @@ class Plugin(object): self.autorecon.add_argument(self, name, choices=choices, default=default, help=help) @final - def get_option(self, name): + def get_option(self, name, default=None): # TODO: make sure name is simple. name = self.slug.replace('-', '_') + '.' + slugify(name).replace('-', '_') if name in vars(self.autorecon.args): - return vars(self.autorecon.args)[name] + if vars(self.autorecon.args)[name] is None: + if default: + return default + else: + return None + else: + return vars(self.autorecon.args)[name] else: + if default: + return default return None @final diff --git a/pyproject.toml b/pyproject.toml index 0b44e3d..02cb1f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "autorecon" -version = "2.0.23" +version = "2.0.24" description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services." authors = ["Tib3rius"] license = "GNU GPL v3"