edit bettercap.py

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-24 00:28:55 +02:00
parent 3435e6ccec
commit bf4aec75f3
6 changed files with 61 additions and 20 deletions

View File

@ -39,12 +39,17 @@ start_monitor_interface() {
rfkill unblock all
ifconfig wlan0 up
iw dev wlan0 set power_save off
airmon-ng start wlan0
airmon-ng check kill
iw phy "$(iw phy | head -1 | cut -d" " -f2)" interface add wlan0mon type monitor && ifconfig wlan0mon up
# If wlan0 is NOT taken down after bringing up mon0, then when switching to AUTO you will get:
# error 400: error while initializing wlan0mon to channel 1: iw: out=command failed: Device or resource busy (-16) err=exit status 240
ifconfig wlan0 down
}
# stops mon0
stop_monitor_interface() {
airmon-ng stop wlan0mon
ifconfig wlan0mon down && iw dev wlan0mon del
ifconfig wlan0 up
}