I want to disable monitor mode for the interal wlan0 card of the pi. If you want to do that too and use wlan1 as mon0 do:
sed -i 's/phy0/phy1/g' /usr/bin/pwnlib
If you want wlan0 and wlan1 in monitor mode and want to use wlan1 as pwnagotchi device, use this ps did didn't work for me but above example
sudo su
rm /etc/network/interfaces.d/wlan1-cfg
echo 'allow-hotplug wlan1' >> /etc/network/interfaces.d/wlan1-cfg
echo 'iface wlan1 inet manual' >> /etc/network/interfaces.d/wlan1-cfg
echo 'pre-up iw phy phy1 interface add mon1 type monitor' >> /etc/network/interfaces.d/wlan1-cfg
echo 'pre-up iw dev wlan1 del' >> /etc/network/interfaces.d/wlan1-cfg
echo 'pre-up ifconfig mon1 up' >> /etc/network/interfaces.d/wlan1-cfg
sed -i 's/mon0/mon1/g' /usr/bin/bettercap-launcher
sed -i 's/mon0/mon1/g' /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap
sed -i 's/mon0/mon1/g' /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap
sed -i 's/mon0/mon1/g' /etc/pwnagotchi/config.toml
sed -i 's/iface mon0/iface mon1/g' /etc/systemd/system/pwngrid-peer.service
sed -i 's/mon0/mon1/g' /usr/bin/pwnlib
If you want to revert to the onboard wireless run this command:
sed -i ‘s/mon1/mon0/g’ /usr/bin/bettercap-launcher
sed -i 's/mon1/mon0/g' /usr/bin/bettercap-launcher
sed -i 's/mon1/mon0/g' /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap
sed -i 's/mon1/mon0/g' /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap
sed -i 's/mon1/mon0/g' /etc/pwnagotchi/config.toml
sed -i 's/phy1/phy0/g' /usr/bin/pwnlib
if you just want to disable the internal pi card and use an adapter use this:
echo dtoverlay=pi3-disable-wifi | sudo tee -a /boot/config.txt
I had to change a bit more:
phy0
did not exist in/usr/bin/pwnlib
. I had to change the functionstart_monitor_interface
,and I had to switch
mon0
withmon1
.