-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmacchanger-cli.sh
More file actions
executable file
·205 lines (185 loc) · 4.37 KB
/
macchanger-cli.sh
File metadata and controls
executable file
·205 lines (185 loc) · 4.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#!/usr/bin/env bash
interfaces() {
ifaces=( $(ip addr list | awk -F': ' '/^[0-9]/ && $2 != "lo" {print $2}') )
}
printOptions() {
read -p "Option Number?: " Opt
}
startup() {
echo '
__ ___ __
/ |/ /___ ___________/ /_ ____ _____ ____ ____ _____
/ /|_/ / __ `/ ___/ ___/ __ \/ __ `/ __ \/ __ `/ _ \/ ___/
/ / / / /_/ / /__/ /__/ / / / /_/ / / / / /_/ / __/ /
/_/ /_/\__,_/\___/\___/_/ /_/\__,_/_/ /_/\__, /\___/_/
/____/ ' | lolcat --spread 1.0
echo ''
echo ''
echo '[1]. Select Network Interface' | lolcat --spread 1.0
echo '[2]. Set interface Down' | lolcat --spread 1.0
echo '[3]. Change Mac' | lolcat --spread 1.0
echo '[4]. Set Interface Up' | lolcat --spread 1.0
echo ''
}
startup
sleep 0.5
printOptions
if [ $Opt = 1 ]
then
echo "Getting interface names..." | lolcat --spread 1.0
sleep 3
interfaces
#printf '%s\n' "${ifaces[@]}" # For testing only
echo '
__ ___ __
/ |/ /___ ___________/ /_ ____ _____ ____ ____ _____
/ /|_/ / __ `/ ___/ ___/ __ \/ __ `/ __ \/ __ `/ _ \/ ___/
/ / / / /_/ / /__/ /__/ / / / /_/ / / / / /_/ / __/ /
/_/ /_/\__,_/\___/\___/_/ /_/\__,_/_/ /_/\__, /\___/_/
/____/ ' | lolcat --spread 1.0
echo '[1] ' ${ifaces[0]} | lolcat --spread 1.0
echo '[2] ' ${ifaces[1]} | lolcat --spread 1.0
echo '[3] ' ${ifaces[2]} | lolcat --spread 1.0
echo '[4] ' ${ifaces[3]} | lolcat --spread 1.0
echo '[5] ' ${ifaces[4]} | lolcat --spread 1.0
echo '[6] ' ${ifaces[5]} | lolcat --spread 1.0
echo '[7] ' ${ifaces[6]} | lolcat --spread 1.0
echo '[8] ' ${ifaces[7]} | lolcat --spread 1.0
echo '[9] ' ${ifaces[8]} | lolcat --spread 1.0
echo '[10] ' ${ifaces[9]} | lolcat --spread 1.0
read -p "Option Number?: " ifaceOpt
if [ $ifaceOpt = 1 ]
then
echo "Interface 1 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[0]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 2 ]
then
echo "Interface 2 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[1]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 3 ]
then
echo "Interface 3 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[2]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 4 ]
then
echo "Interface 4 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[3]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 5 ]
then
echo "Interface 5 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[4]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 6 ]
then
echo "Interface 6 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[5]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 7 ]
then
echo "Interface 7 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[6]}
clear
startup
printOptions
fi
if [ $ifaceOpt = 8 ]
then
echo "Interface 8 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[7]}
clear
startupup
printOptions
fi
if [ $ifaceOpt = 9 ]
then
echo "Interface 9 Selected!" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[8]}
clear
startupup
printOptions
fi
if [ $ifaceOpt = 10 ]
then
echo "Interface 10 Selected! (You have a lot of interfaces!!)" | lolcat --spread 1.0
echo "Setting interface selected..." | lolcat --spread 1.0
sleep 1
interface=${ifaces[9]}
clear
startup
printOptions
fi
if [ $Opt = 2 ]
then
echo "Setting selected interface to down" | lolcat --spread 1.0
sudo ifconfig $interface down
clear
startup
printOptions
fi
if [ $Opt = 3 ]
then
echo ''
read -p "Mac address to spoof? (must be with colons): " Mac
echo "Setting Mac..." | lolcat --spread 1.0
sleep 5
sudo macchanger --mac=$Mac $interface
clear
startup
printOptions
fi
if [ $Opt = 4 ]
then
sudo ifconfig $interface up
clear
startup
printOptions
fi
if [[ "$Opt" != '4' ]] && [[ "$Opt" != '3' ]] && [[ "$Opt" != '2' ]] && [[ "$Opt" != '1' ]];
then
clear
echo "Please type number from 1-4 :)" | lolcat --spread 1.0
sleep 2
clear
startup
printOptions
fi