From a4d08bae0d8b3b2f265c1e9073a6a185af723c36 Mon Sep 17 00:00:00 2001 From: Tib3rius <48113936+Tib3rius@users.noreply.github.com> Date: Wed, 5 Jan 2022 21:22:03 -0500 Subject: [PATCH] Update main.py Fixed small logic bug. --- autorecon/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autorecon/main.py b/autorecon/main.py index 5a3167a..01f0e36 100644 --- a/autorecon/main.py +++ b/autorecon/main.py @@ -235,7 +235,7 @@ async def port_scan(plugin, target): warn('A process was left running after port scan {bblue}' + plugin.name + ' {green}(' + plugin.slug + '){rst} against {byellow}' + target.address + '{rst} finished. Please ensure non-blocking processes are awaited before the run coroutine finishes. Awaiting now.', verbosity=2) await process_dict['process'].wait() - if process_dict['process'].returncode != 0 or (process_dict['cmd'].contains('curl') and process_dict['process'].returncode != 22): + if process_dict['process'].returncode != 0: errors = [] while True: line = await process_dict['stderr'].readline() @@ -323,7 +323,7 @@ async def service_scan(plugin, service): warn('A process was left running after service scan {bblue}' + plugin.name + ' {green}(' + tag + '){rst} against {byellow}' + service.target.address + '{rst} finished. Please ensure non-blocking processes are awaited before the run coroutine finishes. Awaiting now.', verbosity=2) await process_dict['process'].wait() - if process_dict['process'].returncode != 0: + if process_dict['process'].returncode != 0 and not (process_dict['cmd'].startswith('curl') and process_dict['process'].returncode == 22): errors = [] while True: line = await process_dict['stderr'].readline()