Changed pwnlib to pull the monitor mode interface name from /etc/pwnagotchi/config.toml (or default.toml if not in config.toml). Changed pwngrid and bettercap launchers to use a variable from pwnlib for monitor device instead of hard coded. fix_pwny_iface.sh edits config.toml and pwnlib to set the devices based on interface "phy#" number. This makes it easy to switch pwnagotchi to a USB wifi dongle, and easily switch back to internal wifi.
Description
Same as above
Motivation and Context
[ ] I have raised an issue to propose this change (required)
Instead of having to edit several files to switch wifi devices, you can just run "fix_pwny_iface.sh #" with the "phy" number for the interface.
How Has This Been Tested?
This was first developed for bananapi m4zero, where the internal wifi does not show up as "wlan0", but as a uniquely named device (maybe a serial number. Since it was having to identify devices, I made the fix_pwny_iface script take a parameter so you could pick the device index instead of just the default device. Tested with a USB dongle on the bananapi, and switched pwnagotchi back and forth between the two interfaces.
Types of changes
[ ] Bug fix (non-breaking change which fixes an issue)
[X ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[ X] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
Changed pwnlib to pull the monitor mode interface name from /etc/pwnagotchi/config.toml (or default.toml if not in config.toml). Changed pwngrid and bettercap launchers to use a variable from pwnlib for monitor device instead of hard coded. fix_pwny_iface.sh edits config.toml and pwnlib to set the devices based on interface "phy#" number. This makes it easy to switch pwnagotchi to a USB wifi dongle, and easily switch back to internal wifi.
Description
Same as above
Motivation and Context
Instead of having to edit several files to switch wifi devices, you can just run "fix_pwny_iface.sh #" with the "phy" number for the interface.
How Has This Been Tested?
This was first developed for bananapi m4zero, where the internal wifi does not show up as "wlan0", but as a uniquely named device (maybe a serial number. Since it was having to identify devices, I made the fix_pwny_iface script take a parameter so you could pick the device index instead of just the default device. Tested with a USB dongle on the bananapi, and switched pwnagotchi back and forth between the two interfaces.
Types of changes
Checklist:
git commit -s