Update autorecon.py
Fixed potential memory leak. Fixed possible display bug.
This commit is contained in:
		
							parent
							
								
									6114970e26
								
							
						
					
					
						commit
						37a6b47954
					
				|  | @ -1507,6 +1507,8 @@ async def main(): | ||||||
| 		for task in done: | 		for task in done: | ||||||
| 			if autorecon.pending_targets: | 			if autorecon.pending_targets: | ||||||
| 				pending.add(asyncio.create_task(scan_target(Target(autorecon.pending_targets.pop(0), autorecon)))) | 				pending.add(asyncio.create_task(scan_target(Target(autorecon.pending_targets.pop(0), autorecon)))) | ||||||
|  | 			if task in pending: | ||||||
|  | 				pending.remove(task) | ||||||
| 
 | 
 | ||||||
| 		port_scan_task_count = 0 | 		port_scan_task_count = 0 | ||||||
| 		for targ in autorecon.scanning_targets: | 		for targ in autorecon.scanning_targets: | ||||||
|  | @ -1528,9 +1530,6 @@ async def main(): | ||||||
| 	except: | 	except: | ||||||
| 		pass | 		pass | ||||||
| 
 | 
 | ||||||
| 	# Restore original terminal settings. |  | ||||||
| 	termios.tcsetattr(sys.stdin, termios.TCSADRAIN, terminal_settings) |  | ||||||
| 
 |  | ||||||
| 	if timed_out: | 	if timed_out: | ||||||
| 		cancel_all_tasks(None, None) | 		cancel_all_tasks(None, None) | ||||||
| 
 | 
 | ||||||
|  | @ -1547,6 +1546,9 @@ async def main(): | ||||||
| 	if autorecon.missing_services: | 	if autorecon.missing_services: | ||||||
| 		warn('{byellow}AutoRecon identified the following services, but could not match them to any plugins based on the service name. Please report these to Tib3rius: ' + ', '.join(autorecon.missing_services) + '{rst}') | 		warn('{byellow}AutoRecon identified the following services, but could not match them to any plugins based on the service name. Please report these to Tib3rius: ' + ', '.join(autorecon.missing_services) + '{rst}') | ||||||
| 
 | 
 | ||||||
|  | 	# Restore original terminal settings. | ||||||
|  | 	termios.tcsetattr(sys.stdin, termios.TCSADRAIN, terminal_settings) | ||||||
|  | 
 | ||||||
| if __name__ == '__main__': | if __name__ == '__main__': | ||||||
| 	signal.signal(signal.SIGINT, cancel_all_tasks) | 	signal.signal(signal.SIGINT, cancel_all_tasks) | ||||||
| 	try: | 	try: | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue