diff --git a/IP_hosts_scan_multithreadingv2.0.py b/IP_hosts_scan_multithreadingv2.0.py index 32356036d1e69ed21e09b7cb1eeed9cb6d361d82..3b8db15a0845c543ba5d18d3f0c79eb7d395bea0 100644 --- a/IP_hosts_scan_multithreadingv2.0.py +++ b/IP_hosts_scan_multithreadingv2.0.py @@ -36,11 +36,7 @@ def host_check(host_ip): success_list.append(info) pbar.echo(info) pbar.update_suc() - open('hosts_ok-ism.txt','a', encoding='utf-8').write(str(info)+'\n') - with open('hosts_ok.txt','a+') as f: - f.write(info.encode("utf-8") + "\n") - f.close() - + open('hosts_ok-is.txt','a', encoding='utf-8').write(str(info)+'\n') finally: lock.release() @@ -72,7 +68,7 @@ if __name__ == '__main__': original_sigint_handler = signal.signal(signal.SIGINT, signal.SIG_IGN) signal.signal(signal.SIGINT, original_sigint_handler) - pool = Pool(40) + pool = Pool(20) try: pool.map_async(host_check, host_ip_list)