wake-on-lan using scapy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scapy.sendrecv import send | |
from scapy.layers.inet import * | |
from binascii import unhexlify | |
import sys | |
magic = '' | |
for h in sys.argv[1].split(':'): magic += unhexlify(h); | |
send(IP(dst="255.255.255.255")/UDP(dport=9)/Raw(load=(chr(0xff)*6 + magic*16))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment