It is necessary to fasten monitor of hosts to flask. When a user visits a page, he should see:
192.168.0.1 - в сети 192.168.0.2 - не в сети 192.168.0.3 - в сети Let's say it will be checked on port 22
import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: s.connect(('192.168.0.1', 22)) print("Хост в сети") except socket.error as e: print("Хост не в сети") s.close() It is desirable that dynamically updated Prompt how to implement.