Skip to content

Instantly share code, notes, and snippets.

@rboyd
Created January 13, 2013 23:20
Show Gist options
  • Save rboyd/4526766 to your computer and use it in GitHub Desktop.
Save rboyd/4526766 to your computer and use it in GitHub Desktop.
wake on lan packet
#!/usr/bin/env python
import socket;
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM);
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1);
s.sendto('\xff'*6+'\x00\x13\xd4\x37\x02\xdb'*16, ('10.0.0.255', 80));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment