diff options
-rwxr-xr-x | mac.sh | 16 | ||||
-rwxr-xr-x | monitor.sh | 15 | ||||
-rwxr-xr-x | normal.sh | 8 |
3 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,16 @@ +if [[ $UID != 0 ]]; then + echo "You must be root." + exit -1 +fi +if [[ $# -ne 1 ]]; then + echo "You must provide a mac address you'd like to change to." + exit -1 +fi + +systemctl stop dhcpcd.service +systemctl stop wpa_supplicant.service +ifconfig wlan0 down +macchanger -m $1 wlan0 +ifconfig wlan0 up +systemctl start dhcpcd.service +systemctl start wpa_supplicant@wlan0.service diff --git a/monitor.sh b/monitor.sh new file mode 100755 index 0000000..c239351 --- /dev/null +++ b/monitor.sh @@ -0,0 +1,15 @@ +if [[ $UID != 0 ]]; then + echo "You must be root." + exit -1 +fi +systemctl stop dhcpcd.service +systemctl stop wpa_supplicant.service +if [ $# -eq 1 ]; then + ifconfig wlan0 down + iwconfig wlan0 mode managed + ifconfig wlan0 up + ifconfig wlan0 channel $1 +fi +ifconfig wlan0 down +iwconfig wlan0 mode monitor +ifconfig wlan0 up diff --git a/normal.sh b/normal.sh new file mode 100755 index 0000000..13970aa --- /dev/null +++ b/normal.sh @@ -0,0 +1,8 @@ +if [[ $UID != 0 ]]; then + echo "You must be root." + exit -1 +fi +ifconfig wlan0 down +ifconfig wlan0 up +systemctl start dhcpcd.service +systemctl start wpa_supplicant@wlan0.service |