Created
August 29, 2017 20:05
-
-
Save dayne/9409416a21ce03bee25b0bbeb4280bf0 to your computer and use it in GitHub Desktop.
edex port check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import socket | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
ports = [ 5672 , 9581, 9582, 388 ] | |
for i in ports: | |
result = sock.connect_ex(('137.229.19.230',i)) | |
if result == 0: | |
print "Port %d is open" % i | |
else: | |
print "Port %d is not open" % i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment