前言:
没有前言
0x01
from scapy.all import * import sys from socket import * import os from threading import * screenlock=Semaphore(value=500) def gsd(): print '[*]TCP routing' try: r2,unans=traceroute([sys.argv[1]],dport=[sys.argv[2]],maxttl=20) except Exception,e: print '[-]Im sorry for the mistake. The reason is:{}'.format(e) def IPall(): try: a = IP(dst=sys.argv[1]+'/30') print '[*]Target all IP' print [p for p in a] except Exception,a: print '[-]Im sorry for the mistake. The reason is:{}'.format(a) def os(host,port): try: s=socket(AF_INET,SOCK_STREAM) s.connect((host,port)) print('[+] %d open' % port) s.close() except: pass gsd() IPall() if __name__ == '__main__': setdefaulttimeout(1) for p in range(1,1024): t=Thread(target=os,args=(sys.argv[1],p)) t.start()