Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- import sys
- try:
- #ip = input('Digite o IP ou Host para analise :')
- ip = sys.argv[1]
- ports = [21, 22, 23, 135, 8080, 80, 443, 3306]
- print("""\033[92m """)
- print("""\033[92m ___ _ ___ """)
- print("""\033[92m | . \ ___ _ _ _| |_ / __> ___ ___ ._ _ """)
- print("""\033[92m | _// . \| '_> | | \__ \/ | '<_> || ' | """)
- print("""\033[92m |_| \___/|_| |_| <___/\_|_.<___||_|_| """)
- print()
- for port in ports:
- client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- client.settimeout(0.05)
- code = client.connect_ex((ip, port))
- if code == 0:
- print('Scann ==>' + str(port) + ' [?] Porta aberta [?]')
- else:
- print('Scann ==>' + str(port) + ' [*] Porta fechada [*]')
- except ValueError:
- pass
Advertisement
Add Comment
Please, Sign In to add comment