/ Published in: Python

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import socket def isOpen(ip,port): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect((ip, int(port))) s.shutdown(2) return True except: return False
Comments
