def main():
"""main function"""
global timeout
opt = parse_options()
scan_network = opt.network
try:
timeout = float(opt.timeout)
except ValueError:
timeout = 0.5
print("Use default timeout {}".format(timeout))
hosts = []
if '/' in scan_network:
network = IPv4Network(scan_network)
for host in network.iterhosts():
hosts.append(str(host))
print('start to scan network {} for {} hosts...'.format(str(network), len(hosts)))
pool = multiprocessing.Pool(processes=16)
pool.map(scan, hosts)
pool.close()
pool.join()
else:
print('start to scan host {}'.format(scan_network))
scan(scan_network)
print("done")
wannacry_tlscan.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录