Skip to content

Instantly share code, notes, and snippets.

@ncrmro
Created June 26, 2020 23:20
Show Gist options
  • Save ncrmro/57af8b1e361660af618a3fb968eac0ba to your computer and use it in GitHub Desktop.
Save ncrmro/57af8b1e361660af618a3fb968eac0ba to your computer and use it in GitHub Desktop.
Unlock Encrypted Root Disk using dropper with auto find IP on MAC address
artul() {
MAC_ADDRESS=94:c6:91:ae:53:fc
NETWORK=192.168.1
echo Attempting to find IP address of host to unlock with MAC address $MAC_ADDRESS on $NETWORK.0
IP_ADDRESS=`for ((i=1; i<=255; i++));do arp $NETWORK.$i; done | grep $MAC_ADDRESS | awk '{print $2}' | sed -e 's/(//' -e 's/)//'`
echo Found IP address: $IP_ADDRESS
ssh root@$IP_ADDRESS -p 22 -i ~/.ssh/id_rsa
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment