Ajouter banner.py
This commit is contained in:
@@ -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')
|
||||||
Reference in New Issue
Block a user