首页 > 代码库 > 自己写的low比端口扫描 用的socket

自己写的low比端口扫描 用的socket

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

自己写的low比端口扫描 用的socket