diff --git a/autorecon.py b/autorecon.py index 84ac789..abb966b 100644 --- a/autorecon.py +++ b/autorecon.py @@ -764,6 +764,9 @@ def cancel_all_tasks(signal, frame): # Restore original terminal settings. termios.tcsetattr(sys.stdin.fileno(), termios.TCSADRAIN, terminal_settings) +def timeout(signal, frame): + raise Exception("Function timed out.") + async def start_heartbeat(target, period=60): while True: await asyncio.sleep(period) @@ -1665,11 +1668,20 @@ async def main(): if i >= num_new_targets: break + # The verbosity_monitor.stop() function sometimes seems to block forever. + # Since it will get killed at the end of the program anyway, if it takes + # more than 1 second to work, we'll time it out. + signal.signal(signal.SIGALRM, timeout) + signal.alarm(1) + try: verbosity_monitor.stop() except: pass + # Cancel the alarm. + signal.alarm(0) + if timed_out: cancel_all_tasks(None, None) diff --git a/config.toml b/config.toml index f343a8d..a2b1a3b 100644 --- a/config.toml +++ b/config.toml @@ -1,7 +1,7 @@ # Configure regular AutoRecon options at the top of this file. # verbose = 1 -# max-scans = 1 +# max-scans = 30 # Configure global pattern matching here. [[pattern]] @@ -11,10 +11,19 @@ pattern = 'State: (?:(?:LIKELY\_?)?VULNERABLE)' [[pattern]] pattern = '(?i)unauthorized' +[[pattern]] +description = 'CVE Identified: {match}' +pattern = '(CVE-\d{4}-\d{4,7})' + # Configure global options here. # [global] # username-wordlist = '/usr/share/seclists/Usernames/cirt-default-usernames.txt' # Configure plugin options here. # [dirbuster] -# wordlist = ['/usr/share/seclists/Discovery/Web-Content/common.txt', '/usr/share/seclists/Discovery/Web-Content/big.txt', '/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt'] +# threads = 50 +# wordlist = [ +# '/usr/share/seclists/Discovery/Web-Content/common.txt', +# '/usr/share/seclists/Discovery/Web-Content/big.txt', +# '/usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt' +# ]