Sniffleupagus / pwnagotchi-snflpgs

(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFi pwning.
https://pwnagotchi.ai/
Other
15 stars 1 forks source link

Easy switching wifi/monitor device #5

Closed Sniffleupagus closed 8 months ago

Sniffleupagus commented 8 months ago

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: