标签:bin == imp socket pytho 10.10 nec div 主机
#!/usr/bin/python3
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result = sock.connect_ex((‘10.10.130.111‘,8080))
if 0 == result:
print("Port is open")
else:
print("Port is not open,return code:%s" % result)
标签:bin == imp socket pytho 10.10 nec div 主机
原文地址:http://www.cnblogs.com/standby/p/7128724.html