Fixed a bug where AutoRecon wouldn't restore the terminal after running the help menu in Bash.
This commit is contained in:
Tib3rius 2021-08-26 20:14:06 -04:00 committed by GitHub
parent 6114970e26
commit 296fc52047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -11,8 +11,6 @@ colorama.init()
# Save current terminal settings so we can restore them. # Save current terminal settings so we can restore them.
terminal_settings = termios.tcgetattr(sys.stdin.fileno()) terminal_settings = termios.tcgetattr(sys.stdin.fileno())
# This makes it possible to capture keypresses without <enter> and without displaying them.
tty.setcbreak(sys.stdin.fileno())
class Pattern: class Pattern:
@ -1480,9 +1478,6 @@ async def main():
num_initial_targets = max(1, math.ceil(autorecon.config['max_port_scans'] / port_scan_plugin_count)) num_initial_targets = max(1, math.ceil(autorecon.config['max_port_scans'] / port_scan_plugin_count))
verbosity_monitor = keyboard.Listener(on_press=change_verbosity)
verbosity_monitor.start()
start_time = time.time() start_time = time.time()
pending = [] pending = []
@ -1493,6 +1488,12 @@ async def main():
if i >= num_initial_targets: if i >= num_initial_targets:
break break
# This makes it possible to capture keypresses without <enter> and without displaying them.
tty.setcbreak(sys.stdin.fileno())
verbosity_monitor = keyboard.Listener(on_press=change_verbosity)
verbosity_monitor.start()
timed_out = False timed_out = False
while pending: while pending:
done, pending = await asyncio.wait(pending, return_when=asyncio.FIRST_COMPLETED, timeout=1) done, pending = await asyncio.wait(pending, return_when=asyncio.FIRST_COMPLETED, timeout=1)