Ajouter banner.py

This commit is contained in:
2024-10-18 15:02:00 +02:00
parent e9f5772c20
commit 3e449857fa
+17
View File
@@ -0,0 +1,17 @@
import socket
socket.setdefaulttimeout(0.03)
target_ip=["127.0.0.1"]
target_port=[21,22,23,25,80,110,443,]
for ip in target_ip:
for port in target_port:
s = socket.socket()
try:
s.connect((ip,port))
banner = s.recv(1024)
s.close()
print(banner, ip, port)
except:
print('Ca marche pas ' + ip,port,'ne répond pas')