首页 > 编程语言 > 详细

Python Hacking Tools - Port Scanner

时间:2019-08-10 00:40:31      阅读:88      评论:0      收藏:0      [点我收藏+]

Socket Programming

1.  Scan the target Vulnerable Server. And test it by telnet.

技术分享图片

2. Write the scanner source code.

import socket

ip = "10.0.0.32"

for port in range(1,10000):
    try:
        s = socket.socket()
        s.connect((ip,port))
        s.close()
        print "%d/tcp" %(port)
    except:
        pass

3. Execute the code. And the result is as following:

技术分享图片

 

Python Hacking Tools - Port Scanner

原文:https://www.cnblogs.com/keepmoving1113/p/11330072.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!