diff --git a/root-toon.sh b/root-toon.sh index a6444d3..88fc5db 100755 --- a/root-toon.sh +++ b/root-toon.sh @@ -38,9 +38,9 @@ fi echo "Blocking all HTTPS (and therefore Toon VPN). Reboot your toon now. And after that press the 'software' button on your Toon." /sbin/iptables -I FORWARD -p tcp --dport 443 -j DROP -OUTPUT=`/usr/sbin/tcpdump -n -i any port 31080 -c 1 2>/dev/null` || exit "tcpdump failed" -TOONIP=`echo $OUTPUT | cut -d\ -f3 | cut -d\. -f1,2,3,4` -IP=`echo $OUTPUT | cut -d\ -f5 | cut -d\. -f1,2,3,4` +OUTPUT=`/usr/bin/tcpdump -n -i any port 31080 -c 1 2>/dev/null` || exit "tcpdump failed" +TOONIP=`echo $OUTPUT | cut -d\ -f5 | cut -d\. -f1,2,3,4` +IP=`echo $OUTPUT | cut -d\ -f7 | cut -d\. -f1,2,3,4` [ -f /tmp/pipe.in ] || /usr/bin/mkfifo /tmp/pipe.in [ -f /tmp/pipe.out ] || /usr/bin/mkfifo /tmp/pipe.out diff --git a/tcpdump_output.txt b/tcpdump_output.txt new file mode 100644 index 0000000..9b2c7c5 --- /dev/null +++ b/tcpdump_output.txt @@ -0,0 +1,2 @@ +16:10:10.513421 wlan0 In IP 10.42.0.49.45455 > 172.18.16.1.31080: Flags [S], seq 3022936550, win 29200, options [mss 1460,sackOK,TS val 4294945394 ecr 0,nop,wscale 6], length 0 +