From 6c78ba07464734290f4aec745d68d7a170dd6545 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 12 Sep 2011 20:54:49 -0400 Subject: Initial commit. --- mac.sh | 16 ++++++++++++++++ monitor.sh | 15 +++++++++++++++ normal.sh | 8 ++++++++ 3 files changed, 39 insertions(+) create mode 100755 mac.sh create mode 100755 monitor.sh create mode 100755 normal.sh diff --git a/mac.sh b/mac.sh new file mode 100755 index 0000000..3f1d397 --- /dev/null +++ b/mac.sh @@ -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 -- cgit v1.2.3-59-g8ed1b