forgot to push whoopsie
This commit is contained in:
parent
129c3c6915
commit
2f5cacd57b
1 changed files with 13 additions and 4 deletions
17
main.py
17
main.py
|
@ -220,10 +220,19 @@ def main():
|
||||||
ip_line_map[ip] = idx + 1
|
ip_line_map[ip] = idx + 1
|
||||||
for ip in ips_to_scan:
|
for ip in ips_to_scan:
|
||||||
print_status_line(ip, "waiting to scan...")
|
print_status_line(ip, "waiting to scan...")
|
||||||
for ip in ips_to_scan:
|
with ThreadPoolExecutor(max_workers=50) as ip_executor:
|
||||||
if shutdown_event.is_set():
|
futures = []
|
||||||
break
|
for ip in ips_to_scan:
|
||||||
scan_ports_for_ip(ip, port_start, port_end)
|
if shutdown_event.is_set():
|
||||||
|
break
|
||||||
|
futures.append(ip_executor.submit(scan_ports_for_ip, ip, port_start, port_end))
|
||||||
|
|
||||||
|
for future in as_completed(futures):
|
||||||
|
try:
|
||||||
|
future.result()
|
||||||
|
except Exception as e:
|
||||||
|
print(f"[!] error scanning IP: {e}")
|
||||||
|
|
||||||
|
|
||||||
bottom_line = len(ip_line_map) + 3 + len(open_port_msgs)
|
bottom_line = len(ip_line_map) + 3 + len(open_port_msgs)
|
||||||
move_cursor(bottom_line, 0)
|
move_cursor(bottom_line, 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue