+ 1
In Line 12 is wrong but u dont know how i make it right can some one help me pls
import socket import sys from datetime import datetime target = "scanme.nmap.org" targetIP = socket.gethostbyname(target) tstart = datetime.now() try: for p in range(1, 45000): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) res = sock.connect_ex((targetIP, p)) if res == 0: print("Offene Verbindung in Port " + str(p)) sock.close() except Exeption: print("There was an error.") sys.exit()
5 Answers
+ 9
Sakatora ,
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # this line needs additional indentation >>>
except Exeption: # this line has a typo in Exeption: should be Exception. should also have the same indentation level as *try*.
^
+ 2
Sry but i dont understand it i dont how i additional it
+ 1
But thx for help
+ 1
ŠŠµŃŃ Š¾ŃŃŃŃŠæŠ° Ń ŃŠøŠŗŠ»Š° for