Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 15 lines (12 sloc) 341 Bytes
#!/bin/bash
Port="9"
MAC="ffffffffffff"
IP="10.0.0.255"
# Inspired by https://gist.github.com/SteveMarshall/c3d38b220e2a621d68c9b7d4e376a82f
MagicPacket=$(
printf "f%.0s" {1..12}
printf "$MAC%.0s" {1..16}
)
MagicPacket="${MagicPacket//??/\\x&}"
# Doesn't work for all MAC-addresses
echo -e "${MagicPacket}" > "/dev/udp/${IP}/${Port}"