1
Sítě / Jakou zprávu poslat serveru, aby o sobě podal informace?
« kdy: 12. 05. 2022, 12:08:03 »
Delam jednoduchy port scanner v Pythonu:
A chtel bych informaci o otevrenem portu doplnit o nejake informace o tom, co tam nasloucha - napr. "Nginx", "Apache Tomcat", "Prestige Router administration console" atp., proste vsechno co se da zjistit.
Jak na to?
Kód: [Vybrat]
def check_port(host, port):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
result = sock.connect_ex((host, port))
if result == 0:
print(f"{host}:{port} is open {socket.}")
sock.close()
A chtel bych informaci o otevrenem portu doplnit o nejake informace o tom, co tam nasloucha - napr. "Nginx", "Apache Tomcat", "Prestige Router administration console" atp., proste vsechno co se da zjistit.
Jak na to?