标签:简单端口扫描
nmap os sys socket main(): portlist=[,,,,] ip_mode1=ip_mode2=ip_mode3=range_=Banner=print(Banner.upper()) print(.upper(),end=) i portlist: print(i,end=) i range(,range_): os.system(+ip_mode1+str(i)+)==: j portlist: print(+ip_mode1+str(i)++j) scan(ip_mode1+str(i),int(j)) : print(+ip_mode1+str(i)+) scan(ip,port): socket.setdefaulttimeout() sock=socket.socket() : sock.connect((ip,port)) s=sock.recv() Exception e: s=print(,e) s: print(+ip++str(port)++s) : print(+ip++str(port)+) write_file(content): __name__==: main()
本文出自 “FOR THE DREAM” 博客,请务必保留此出处http://forthedream.blog.51cto.com/11242688/1926233
标签:简单端口扫描
原文地址:http://forthedream.blog.51cto.com/11242688/1926233