Bug Fix
Fixed a bug where AutoRecon wouldn't restore the terminal after running the help menu in Bash.
This commit is contained in:
parent
6114970e26
commit
296fc52047
13
autorecon.py
13
autorecon.py
|
@ -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 = []
|
||||||
|
@ -1492,7 +1487,13 @@ async def main():
|
||||||
i+=1
|
i+=1
|
||||||
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)
|
||||||
|
|
Loading…
Reference in New Issue