Last active
March 1, 2019 14:31
-
-
Save nyrahul/ffa0a4dbc3220b410cc0ed1484111320 to your computer and use it in GitHub Desktop.
important command ref
This file contains hidden or 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/bash | |
#socat examples: | |
#recv msgs on udp port 60K and print to stdout. recv input on stdin and sendto connected socket. | |
socat - UDP4-LISTEN:60000 | |
socat - UDP4-SENDTO:192.168.106.2:60000 | |
# send contents of t.c to multiple TCP4 servers | |
socat GOPEN:t.c - | tee >(socat - tcp4:127.0.0.1:12345) >(socat - tcp4:127.0.0.1:33455) > /dev/null | |
DST=localhost | |
socat SYSTEM:"./send.sh" - | tee >(socat - udp4:$DST:12345) >(socat - udp4:$DST:33455) >/dev/null | |
#drop packets from source ip (.57) to dst ip (.59) | |
iptables -I OUTPUT -4 -s 10.67.129.57 -d 10.67.129.59 -j DROP | |
# Packet send using netmap-pkt-gen | |
./build-apps/pkt-gen/pkt-gen -f tx -i eth13 -d 192.168.99.178:5001 -s 192.168.99.180:60001 -D 84:ad:58:f3:c2:3f -S 84:ad:58:f3:c4:c1 -R 62700 -l 1024 | |
#Get the target address in RPL-DAO message, tshark cmd format is: | |
tshark -r sim.pcapng -Y "icmpv6.type == 155 && icmpv6.code == 2" -T fields -e icmpv6.rpl.opt.target.prefix 2>/dev/null | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment