
(1) Well, indeed, sed is not explicitly required. In this case replace $Broadcast address by the destination public IP, and open/forward the specified $PortNumber (UDP) on destination.
Free magic packet sender 64 bits#
Tested working on Ubuntu, Kali and even CygWin (Windows 7 SP 1 64 bits ).

SoCat can be used instead (syntax will differ, of course). The forged wake on LAN package is sent to the network stack piping it to NetCat.and so on) prior to sending the string to the network stack. The sed command is used here to remove colons ( :) from the MAC and to add the \x hex specificator (so that 11 becomes \x11, 22 becomes \x22.The WOL magic packet is composed of ffffffffffff (12 times f) followed by 16 times the destination MAC without colons ( :).The command line would be: echo -e $(echo $(printf 'f%.0s' ) | sed -e 's/./\\x&/g') | nc -w1 -u -b $Broadcast $PortNumber

Bash supporting brace expansion (I think it is v3.5.1 and above).The minimum requirements I can think off:
