2 Star 0 Fork 6

狂奔的蜗牛. / system_status

forked from ppabc / system_status 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ports.py 430 Bytes
一键复制 编辑 原始数据 按行查看 历史
ppabc 提交于 2014-10-17 14:02 . net
#!/usr/bin/env python
from socket import *
if __name__ == '__main__':
target = raw_input('Enter host to scan: ')
targetIP = gethostbyname(target)
print 'Starting scan on host ', targetIP
#scan reserved ports
for i in range(20, 1025):
s = socket(AF_INET, SOCK_STREAM)
result = s.connect_ex((targetIP, i))
if(result == 0) :
print 'Port %d: OPEN' % (i,)
s.close()
1
https://gitee.com/snail/system_status.git
git@gitee.com:snail/system_status.git
snail
system_status
system_status
master

搜索帮助