Fixing subnet confusion (#44)

Co-authored-by: fbu <fbuedenhoelzer@it-sec.de>
pull/46/head
cyb3rwr3ck 2021-09-24 18:19:21 +02:00 committed by GitHub
parent 6325b1c381
commit 5e6bbc86d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ COUNT=$(($(ls -l $LOOT_DIR/*.txt | wc -l)+1))
NETMODE DHCP_CLIENT
SERIAL_WRITE [*] Waiting for IP from DHCP
while [ -z "$SUBNET" ]; do
sleep 1 && SUBNET=$(ip addr | grep -i eth0 | grep -i inet | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}[\/]{1}[0-9]{1,2}" | sed 's/\.[0-9]*\//\.0\//')
sleep 1 && SUBNET=$(ip addr | grep -i eth0 | grep -i inet | grep -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}[\/]{1}[0-9]{1,2}")
done
echo "Recieved IP address from DHCP" >> /tmp/payload-debug.log