1
I was trying to make a very simple door scanner, [Winerror 10061] No connection could be made because the destination machine actively refused them (q was the expected) for [Winerror 10038] An operation has been attempted on an item that is not a socket!
def ScanPorts(host,Range):
i=1
while i <= int(Range):
try:
s.connect((host , i))
print(i)
lista_portas.append(i)
s.close()
time.sleep(1)
print(i)
except Exception as e :
print(str(i) + ":" + str(e))
i=i+1
for i in lista_portas:
print('Porta:',i,"aberta")
You are using python 3?
– Miguel