Skip to content

Instantly share code, notes, and snippets.

View lp1dev's full-sized avatar

Jérémie lp1dev

View GitHub Profile
@lp1dev
lp1dev / send-magic-packet.sh
Last active June 23, 2021 19:42 — forked from SteveMarshall/send-magic-packet.sh
Wake-On-Lan Magic Packet using netcat in bash
#!/usr/bin/env ash
mac_address=$1
# Strip colons from the MAC address
mac_address=$(echo $mac_address | sed 's/://g')
broadcast=$2
port=4343
# Magic packets consist of 12*`f` followed by 16 repetitions of the MAC address