From e793903732c5b883718fc3ca72430c3bc2920bcf Mon Sep 17 00:00:00 2001 From: Tib3rius <48113936+Tib3rius@users.noreply.github.com> Date: Thu, 9 Sep 2021 12:39:06 -0400 Subject: [PATCH] Update autorecon.py Made secure/insecure optional for --force-services Fixed bug with keyboard monitor. --- autorecon.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autorecon.py b/autorecon.py index 2e35c99..219b022 100644 --- a/autorecon.py +++ b/autorecon.py @@ -390,7 +390,7 @@ async def scan_target(target): forced_services = [x.strip().lower() for x in config['force_services']] for forced_service in forced_services: - match = re.search('(?P(tcp|udp))\/(?P\d+)\/(?P[\w\-\/]+)\/(?Psecure|insecure)', forced_service) + match = re.search('(?P(tcp|udp))\/(?P\d+)\/(?P[\w\-]+)(\/(?Psecure|insecure))?', forced_service) if match: protocol = match.group('protocol') if config['proxychains'] and protocol == 'udp': @@ -408,7 +408,6 @@ async def scan_target(target): else: error('No services were defined. Please check your service syntax: [tcp|udp]///[secure|insecure]') heartbeat.cancel() - keyboard_monitor.cancel() autorecon.errors = True return else: @@ -1295,7 +1294,8 @@ async def main(): if i >= num_new_targets: break - keyboard_monitor.cancel() + if not config['disable_keyboard_control']: + keyboard_monitor.cancel() # If there's only one target we don't need a combined report if len(autorecon.completed_targets) > 1: