-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchgMAC.sh
executable file
·35 lines (34 loc) · 1.05 KB
/
chgMAC.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
#!/bin/bash
#!main
echo "------------------------------------------"
echo "changement d'adresse MAC(eth0,wlan0,waln1)"
echo "------------------------------------------"
echo "inteface:"
sudo ifconfig
echo "----------------------------------------------"
echo "choisir interface :"
read interface
echo "----------------------------------------------"
sudo ifconfig $interface down
echo "1 : change aleaoirement les 3 dernier octet(laisse les octets du fabriquant)"
echo "2 : change integralement toute interface "
echo "choisir l'option : "
read option
echo "----------------------------------------------"
#!--------------------------------------------------------
if (($option == '1'));
then
echo "choix 1:"
sudo macchanger -e $interface
elif (($option == '2'));
then
echo "choix 2:"
echo "nouvelle adresse mac ?(01:02:03:04:05:06)"
read $adresse_mac
sudo macchanger --mac=$adresse_mac
else #[[$option != 1 || $option != 2]]
echo "###################"
echo "error: bad choice"
echo "###################"
fi
ifconfig $interface up