-
Notifications
You must be signed in to change notification settings - Fork 0
/
IPSecC
44 lines (43 loc) · 1019 Bytes
/
IPSecC
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
#!/bin/bash
#width-height
# MACChanger - Changes MAC Address
# Define GPIO pins if used
macs=$(ls /sys/class/net)
ip=1
# OK button return code =0 , all others =1
while [ $ip -eq 1 ]; do
ans=$(zenity --info --title 'MACChanger' \
--text="Copy your desired interface. Interfaces: $macs" \
--ok-label Back \
--extra-button ChangeMAC \
--extra-button RestoreMAC \
)
ip=$?
echo "${ip}-${ans}"
echo $ans
if [[ $ans = "ChangeMAC" ]]
then
echo -n -e " Which Interface? (Copy and Paste your if): \n$macs "; tput sgr0
read intrf1
sudo ifconfig $intrf1 down
sudo macchanger -r $intrf1
sleep 2
sudo ifconfig $intrf1 up
sleep 2
sudo service networking restart
echo -e "DONE..."
sleep 3;
elif [[ $ans = "RestoreMAC" ]]
then
echo -n -e " Which Interface? (Copy and Paste your if): \n$macs "; tput sgr0
read intrf1
sudo ifconfig $intrf1 down
sudo macchanger -p $intrf1
sleep 2
sudo ifconfig $intrf1 up
sleep 2
sudo service networking restart
echo -e "DONE..."
sleep 3;
fi
done