diff --git a/builder/data/usr/bin/pwnlib b/builder/data/usr/bin/pwnlib index eb73a479..14c412fc 100755 --- a/builder/data/usr/bin/pwnlib +++ b/builder/data/usr/bin/pwnlib @@ -25,15 +25,20 @@ reload_brcm() { if ! modprobe -r brcmfmac; then return 1 fi + sleep 1 if ! modprobe brcmfmac; then return 1 fi + sleep 2 + iw dev wlan0 set power_save off return 0 } # starts mon0 start_monitor_interface() { + iw dev wlan0 set power_save off iw phy "$(iw phy | head -1 | cut -d" " -f2)" interface add mon0 type monitor + sleep 2 ifconfig wlan0 down ifconfig mon0 up } @@ -69,12 +74,12 @@ is_auto_mode() { # if usb0 is up, we're in MANU if is_interface_up usb0; then - return 1 + return 0 fi # if eth0 is up (for other boards), we're in MANU if is_interface_up eth0; then - return 1 + return 0 fi # no override, but none of the interfaces is up -> AUTO