forked from g0tmi1k/os-scripts
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmacmon.sh
executable file
·131 lines (104 loc) · 3.48 KB
/
macmon.sh
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
#!/bin/bash
#Save all monitor interfaces in a list
################################################################################
xterm -geometry 0x0 -e "iwconfig |grep "Mode:Monitor" >> /tmp/mon.txt" & wait
#Menu
################################################################################
echo "-----------------------------------------------"
echo "* MacMon v1.5 -- b33f *"
echo "* -Have a anonymous day- *"
echo "-----------------------------------------------"
echo "*"
echo "* (1) Random MAC - Monitor Mode"
echo "* (2) Set specific MAC - Monitor Mode"
echo "* (3) Display list of vendor specific MAC"
echo "* [The vendor-search is case sensitive]"
echo "* (4) Reverse look-up MAC address"
echo "*"
echo -n "* Select option (1/2/3): "
read -e MACMON
echo "-----------------------------------------------"
#(1) Random MAC -> MON [All monitor interfaces will be taken down!!]
################################################################################
if [ $MACMON = 1 ]; then
airmon-ng |sed 's/^/* /'
echo "-----------------------------------------------"
echo "*"
echo -n "* Select Interface: "
read -e IFACE
echo "*"
echo "-----------------------------------------------"
echo "*"
for list in $(cat /tmp/mon.txt |cut -d" " -f1); do
airmon-ng stop $list &>/dev/null
done
rm /tmp/mon.txt &>/dev/null
echo "* [>] Setting device to monitor mode"
airmon-ng stop $IFACE &>/dev/null
airmon-ng start $IFACE &>/dev/null
wait
ifconfig $IFACE down
ifconfig mon0 down
echo "* [>] Faking MAC"
echo "*"
macchanger -r $IFACE |sed 's/^/* /'
macchanger -r mon0 |sed 's/^/* /'
ifconfig $IFACE up
ifconfig mon0 up
echo "*"
echo "* [>] Done"
echo "-----------------------------------------------"
#(2) Specific MAC -> MON [All monitor interfaces will be taken down!!]
################################################################################
elif [ $MACMON = 2 ]; then
airmon-ng |sed 's/^/* /'
echo "-----------------------------------------------"
echo "*"
echo -n "* Select Interface: "
read -e IFACE
echo -n "* Define the MAC: "
read -e MAC
echo "*"
echo "-----------------------------------------------"
echo "*"
for list in $(cat /tmp/mon.txt |cut -d" " -f1); do
airmon-ng stop $list &>/dev/null
done
rm /tmp/mon.txt &>/dev/null
echo "* [>] Setting device to monitor mode"
airmon-ng stop $IFACE &>/dev/null
airmon-ng start $IFACE &>/dev/null
wait
ifconfig $IFACE down
ifconfig mon0 down
echo "* [>] Faking MAC"
echo "*"
macchanger --mac=$MAC $IFACE |sed 's/^/* /'
macchanger --mac=$MAC mon0 |sed 's/^/* /'
ifconfig $IFACE up
ifconfig mon0 up
echo "*"
echo "* [>] Done"
echo "-----------------------------------------------"
#(3) Vendor specific MAC lookup
################################################################################
elif [ $MACMON = 3 ]; then
echo "*"
echo -n "* Search for vendor name: "
read -e VENDOR
xterm -hold -wf -e "macchanger --list=$VENDOR"&
echo "*"
echo "* [>] Done"
echo "-----------------------------------------------"
#(3) Reverce lookup MAC
################################################################################
elif [ $MACMON = 4 ]; then
echo -n "* Enter MAC: "
read -e SMAC
SMAC=$(echo "$SMAC" | sed 's/:/-/g')
SMAC=$(echo "$SMAC" | cut -c1-8)
export XMAC=`grep -i $SMAC /usr/local/etc/aircrack-ng/airodump-ng-oui.txt`
echo "*"
echo "* $XMAC"
echo "-----------------------------------------------"
fi