Commit 170b646 1 parent e6a87f1 commit 170b646 Copy full SHA for 170b646
File tree 2 files changed +13
-8
lines changed
2 files changed +13
-8
lines changed Original file line number Diff line number Diff line change 5
5
interface=$2
6
6
interfacemon=" ${interface} mon"
7
7
8
- echo " "
8
+
9
9
ifconfig $interface down
10
10
dhclient -r $interface & > /dev/null # release ip
11
11
12
12
if [ " $1 " = " reset" ]; then
13
- echo resetting
13
+ echo ' Resetting MAC address...'
14
+ echo
14
15
macchanger -p $interface
16
+
15
17
elif [ " $1 " = " random" ]; then
16
- echo randomising
18
+ echo ' Randomising MAC address... '
17
19
macchanger -r $interface
20
+
18
21
else
19
22
macchanger -m $1 $interface # change current device mac to input mac
23
+
20
24
fi
21
25
22
26
ifconfig $interface up
23
27
dhclient $interface & > /dev/null # get a new ip
24
28
25
- echo " New mac: $1 "
26
- ifconfig $interface | grep inet
27
- echo " "
28
29
else
30
+
29
31
echo " "
30
32
echo " Incorrect number of arguments!"
31
33
echo " "
32
34
echo " Useage:"
33
35
echo " $0 {mac address} {interface}"
34
36
echo " "
37
+
35
38
fi
Original file line number Diff line number Diff line change 8
8
pwd
9
9
# for i in {1..number of macs}
10
10
i=1
11
+
12
+ echo " Starting! Testing $maccount macs..."
13
+
11
14
while [ $i -le $maccount ]; do
12
- echo " Starting! Testing $maccount macs..."
13
15
echo " "
14
16
15
17
# Get next mac address
16
18
curmac=$( head -n $i $1 | tail -n 1)
17
19
18
20
# change mac address
19
21
echo -n " Changing MAC... "
20
- sudo modules/change_mac $curmac $interface
22
+ sudo modules/change_mac $curmac $interface & > /dev/null
21
23
echo " Done."
22
24
23
25
# Tell the user whats happening
You can’t perform that action at this time.
0 commit comments