diff options
author | 2012-11-01 11:13:53 -0600 | |
---|---|---|
committer | 2012-11-01 11:13:53 -0600 | |
commit | 512eee2d4747d582f96686e625055871598706dc (patch) | |
tree | cba506eeccdf6db353e20c2186b3fe21da758ee6 | |
parent | Add reset module, spoofing convience script, and make normal do a reset instead of a start. (diff) | |
download | wifi-monitoring-scripts-512eee2d4747d582f96686e625055871598706dc.tar.xz wifi-monitoring-scripts-512eee2d4747d582f96686e625055871598706dc.zip |
Modernize scripts.
Diffstat (limited to '')
-rwxr-xr-x | mac.sh | 10 | ||||
-rwxr-xr-x | monitor.sh | 8 | ||||
-rwxr-xr-x | normal.sh | 6 | ||||
-rwxr-xr-x | reset-module.sh | 20 | ||||
-rwxr-xr-x | spoof.sh | 11 |
5 files changed, 35 insertions, 20 deletions
@@ -7,10 +7,12 @@ if [[ $# -ne 1 ]]; then exit -1 fi -systemctl stop dhcpcd.service -systemctl stop wpa_supplicant.service +/etc/init.d/dhcpcd stop +/etc/init.d/wpa_supplicant stop + ifconfig wlan0 down macchanger -m $1 wlan0 ifconfig wlan0 up -systemctl start dhcpcd.service -systemctl start wpa_supplicant@wlan0.service + +/etc/init.d/dhcpcd start +/etc/init.d/wpa_supplicant start @@ -2,13 +2,15 @@ if [[ $UID != 0 ]]; then echo "You must be root." exit -1 fi -systemctl stop dhcpcd.service -systemctl stop wpa_supplicant@wlan0.service + +/etc/init.d/dhcpcd stop +/etc/init.d/wpa_supplicant stop + if [ $# -eq 1 ]; then ifconfig wlan0 down iwconfig wlan0 mode managed ifconfig wlan0 up - iwconfig wlan0 channel $1 + iwconfig wlan0 freq $1 fi ifconfig wlan0 down iwconfig wlan0 mode monitor @@ -2,7 +2,9 @@ if [[ $UID != 0 ]]; then echo "You must be root." exit -1 fi + ifconfig wlan0 down ifconfig wlan0 up -systemctl restart dhcpcd.service -systemctl restart wpa_supplicant@wlan0.service + +/etc/init.d/dhcpcd restart +/etc/init.d/wpa_supplicant restart diff --git a/reset-module.sh b/reset-module.sh index 78845a3..8f114be 100755 --- a/reset-module.sh +++ b/reset-module.sh @@ -2,14 +2,18 @@ if [[ $UID != 0 ]]; then echo "You must be root." exit -1 fi + ifconfig wlan0 down -systemctl stop dhcpcd.service -systemctl stop wpa_supplicant@wlan0.service -rmmod ath9k -rmmod ath9k_common -rmmod ath9k_hw -modprobe ath9k + +/etc/init.d/dhcpcd stop +/etc/init.d/wpa_supplicant stop + +rmmod iwldvm +rmmod iwlwifi +modprobe iwlwifi + iwconfig wlan0 power on ifconfig wlan0 up -systemctl restart dhcpcd.service -systemctl restart wpa_supplicant@wlan0.service + +/etc/init.d/wpa_supplicant start +/etc/init.d/dhcpcd start @@ -7,14 +7,19 @@ if [[ $# -ne 4 ]]; then exit -1 fi -systemctl stop dhcpcd.service -systemctl stop wpa_supplicant.service +/etc/init.d/dhcpcd stop +/etc/init.d/wpa_supplicant stop + ifconfig wlan0 down macchanger -m $4 wlan0 ifconfig wlan0 $1 netmask $2 + ip route del default ip route add default via $3 + echo nameserver 8.8.8.8 > /etc/resolv.conf echo nameserver 8.8.4.4 >> /etc/resolv.conf + ifconfig wlan0 up -systemctl start wpa_supplicant@wlan0.service + +/etc/init.d/wpa_supplicant start |