Iseng-iseng aku bikin skrip sendiri yang cuma pakai netcat, xxd, sama bash. Isi standar paket wakeonlan adalah 0xFF 8 kali, diikuti MAC address (6-byte) diulang 16 kali.
wol.sh
#!/usr/bin/bash
# then you figure out that I am employing Slackware, no?
ADDR=`echo $1 | sed "s/://g"`
echo FFFFFFFFFFFF > /tmp/wol
for i in `seq 1 16`; do echo $ADDR >> /tmp/wol; done
xxd -r -p /tmp/wol /tmp/packet
echo Sending wakeonlan packet to $2 \($1\)
nc $2 7 < /tmp/packet
nc $2 9 < /tmp/packet
rm /tmp/wol /tmp/packet
Cara pakainya sih tinggal:
wol.sh MAC-address ipv4
---ipv4-nya mending di-broadcast address aja, deh.