I encoded a little program a bit. This may not be the exact thing you are looking for, but you can always run a program on the host OS that opens the socket at startup. Here is the ping program itself:
# Run this on the PC that want to check if other PC is online. from socket import * def pingit():
And here you have a program that can receive a ping request:
# this runs on remote pc that is going to be checked from socket import * HOST = 'localhost' PORT = 80 BUFSIZ = 1024 ADDR = (HOST, PORT) serversock = socket(AF_INET, SOCK_STREAM) serversock.bind(ADDR) serversock.listen(2) while 1: clientsock, addr = serversock.accept() serversock.close() exit()
To run the program without showing it, just save the file as .pyw instead of .py. This makes it invisible until the user checks the running processes.
Hope this helped you
Camce
source share