Skip to content

Instantly share code, notes, and snippets.

@Voronenko
Created November 2, 2021 19:30
Show Gist options
  • Save Voronenko/b6ac391da0066d050e3f40e89876883d to your computer and use it in GitHub Desktop.
Save Voronenko/b6ac391da0066d050e3f40e89876883d to your computer and use it in GitHub Desktop.
Here is a Python script that does wake on lan (if your MAC address is01-23-45-67-89-0a:
#!/usr/bin/env python
import socket
s=socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto('\xff'*6+'\x01\x23\x45\x67\x89\x0a'*16, ('192.168.1.255', 80))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment