Last active
December 28, 2015 02:49
-
-
Save ryo/7430945 to your computer and use it in GitHub Desktop.
send udp packet that cksum 0xffff.
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 | |
DST=192.168.2.123 | |
SRC=192.168.0.2 | |
DSTPORT=11111 | |
SRCPORT=12345 | |
perl -e ' | |
sub xip{ pack("C4",map(~(0+$_),split("\\.",shift))) } | |
sub xn{ pack("n",map(~(0+$_),shift)) } | |
print xip(shift),xip(shift),xn(shift),xn(shift),xn(0x3175) | |
' $DST $SRC $DSTPORT $SRCPORT | socat - UDP:$DST:$DSTPORT,sourceport=$SRCPORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment