3967 Commits

Author SHA1 Message Date
Jayofelony
484c7c18ee Merge pull request #431 from jacopotediosi/improve/wpa-sec
Multiple WPA-SEC improvements
2025-09-19 23:22:20 +02:00
Jayofelony
ac4aa2af1e Merge pull request #430 from jacopotediosi/improve/webgpsmap
Multiple webgpsmap improvements
2025-09-19 23:20:15 +02:00
Jacopo Tediosi
83b14f697b Multiple WPA-SEC improvements
# WPA-SEC multiple improvements

This commit is a nearly complete rewrite of the wpa-sec plugin to add features and fix bugs.
Below I try to summarize my changes by dividing them into subchapters.

## Uploading handshakes and tracking their status
The most notable improvement brought by this commit is definitely the drastic increase in handshakes that are actually uploaded to the wpa-sec website.

There are several reasons why a handshake may be invalid and therefore rejected by the wpa-sec website, including:
- too much distance from the clients did not allow to capture all the packets needed to crack the handshake;
- the uploaded pcap file was not yet completed, for example because the pwnagotchi had started writing it when it sent the association frame to the AP but the AP had never responded with the PMKID.

The wpa-sec plugin implementation prior to this commit, uploaded any pcap file contained in the handshakes folder (even if its capture was not completed or if the file was still being written) and did not check the response from the wpa-sec website. If an invalid handshake was uploaded, it was still marked as reported by the plugin and was not retried in subsequent captures.
Additionally, this approach suffered from performance and reliability issues:
- as the number of pcap files in the handshakes folder increased, it became longer and longer to iterate
- the list of handshakes already uploaded was saved in a json file. This list was loaded into memory, so it took up more and more RAM as the number of handshakes increased. If pwnagotchi was turned off during writing, the json file was irreparably corrupted.

This commit instead uses a sqlite db to store the status of uploads, which should be a better choice from the point of view of performance, memory usage, and reliability.
Files are added to the database with status `TOUPLOAD` only when pwnagotchi calls the `on_handshake` function, that is, when it is guaranteed that a handshake has been captured and that writing to the pcap file has finished.
When there is an internet connection, all files with status `TOUPLOAD` are uploaded and the response of the wpa-sec API is checked. If a handshake is rejected by the website, it is marked with status `INVALID` and at the next capture it is set back to `TOUPLOAD` so it will be retried.

## Download cracked passwords into .pcap.cracked single files
The new `single_files` option is implemented in the `config.toml` file. This option (which already existed for the Onlinehashcrack plugin), if set to `true`, downloads the cracked passwords from the wpasec website into individual files with the `.pcap.cracked` extension, so you can see the cracked WiFi passwords directly in the webgpsmap plugin map.

## Download interval
This option was implemented by the commit aluminum-ice/pwnagotchi@b1343b2 and allows you to decide how often to download passwords cracked by wpa-sec. I have adjusted the implementation to make it falls back to the default value of 3600 without crashing the plugin if the option is not set in the `config.toml` file.

## On_webook
The previous implementation of the `on_webhook` function before this commit was broken. When clicking the plugin name in the Plugins tab of the pwnagotchi web UI, you were not actually authenticated to the wpa-sec website, because the code was trying to set the cookie containing the API key on the remote website's origin, so it was obviously not allowed to create cookies due to the Same Origin Policy. The new code implemented by this commit actually authenticates to the wpa-sec website by simulating entering the API key in the website's login form.

## Log messages and exception handling
While rewriting the code I improved the log messages and exception handling (for example, by using the `logging.exception()` method, which prints the exception stacktrace to the logs for easier debugging). Also, this plugin now writes a logging info every time it uploads an handshake to the wpa-sec website, because in my opinion this is a sensitive operation and should be logged.
2025-09-19 16:30:02 +02:00
Jacopo Tediosi
7a8c371a5c Multiple webgpsmap improvements
This commit is a nearly complete rewrite of the webgpsmap plugin frontend to improve responsible design on mobile devices and usability and performance even with hundreds of thousands of markers on the map.

In detail, the following changes have been made:
- updated javascript libraries
- improved screen space management and responsive design (rewriting the html code in modern HTML5 using flexbox correctly)
- calibrated layers max zoom and markerClusterGroup settings to improve map usability based on the Access Point marker size
- the search field now shows an X button to clear the field in browsers that support it (e.g. Chrome)
- added first seen and last seen dates for each AP on the map
- added scale to the map
- implemented current location via leaflet-locatecontrol library (only in secure contexts)
- added offline map download button
- various tricks to improve performance in the case of maps with numerous APs (use of template literals, reduced complexity in creating and applying search filter, ...)
- improved code readability and general refactor (e.g., better subdivision into functions, removed unused or useless code, improved indentation, updated comments, moved variables as much as possible inside their scope)
2025-09-19 16:23:31 +02:00
Jayofelony
1dc6d7bebd Merge pull request #420 from C0d3-5t3w/noai
This negates the need to disable fix_services while using an external wifi adapter.
2025-08-31 08:57:55 +02:00
5T3W
b8eeedf2f6 Merge branch 'jayofelony:noai' into noai 2025-08-19 09:25:12 -07:00
5T3W
8ebf8ed515 Added auto-disable for external adapter use. 2025-07-12 19:00:58 -07:00
Jayofelony
4b33e5b6e5 Merge pull request #419 from C0d3-5t3w/noai
Added AT presets to BR.
2025-07-12 23:28:27 +02:00
5T3W
7b40b5e9df Added AT presets to BR. 2025-07-11 23:38:52 -07:00
Jayofelony
df55933806 Merge pull request #418 from C0d3-5t3w/noai
Added presets to auto-tune.
2025-07-09 19:21:59 +02:00
5T3W
ba3e57be76 Added presets to auto-tune. 2025-07-08 19:18:04 -07:00
Jayofelony
c087193397 Merge pull request #416 from wpa-2/patch-4
Update cmd.py
2025-07-07 00:23:19 +02:00
wpa-2
1571a45204 Update cmd.py
Modified header variable: The table header now includes the title "Author"

Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-07-06 18:32:42 +01:00
Jayofelony
993561da43 Merge pull request #415 from C0d3-5t3w/noai
License and Pwndroid Policy update.
2025-07-06 09:33:04 +02:00
5T3W
89e11850ae License and Policy update. 2025-07-05 19:51:04 -07:00
Jayofelony
c3df982870 Merge pull request #375 from Sniffleupagus/fixRot90
Allow rotation 90 and 270 degrees on screens
2025-03-21 15:47:00 +01:00
Jayofelony
6f7b07f21f Merge pull request #380 from wpa-2/patch-3
Update defaults.toml
2025-03-21 15:42:44 +01:00
wpa-2
4c583cf184 Update defaults.toml
removed dupe entries 
iface = "wlan0mon"
mon_start_cmd = "/usr/bin/monstart"
mon_stop_cmd = "/usr/bin/monstop"
mon_max_blind_epochs = 5
no_restart = false

Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-03-20 17:27:31 +00:00
Sniffleupagus
9a8616df51 Merge branch 'jayofelony:noai' into fixRot90 2025-03-17 16:02:24 -07:00
Sniffleupagus
28c2ef294c Support 90 and 270 rotation 2025-03-17 15:36:16 -07:00
Jayofelony
255ca31837 Merge pull request #374 from wpa-2/noai
Update defaults.toml
2025-03-14 07:51:52 +01:00
wpa-2
661687e180 Update defaults.toml
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-03-13 19:20:02 +00:00
Jeroen Oudshoorn
fb8ee9dbee Keep toml installed
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2025-03-09 12:04:50 +01:00
Jeroen Oudshoorn
d98be99c6b Add PwnCrack.org plugin
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2025-03-09 11:59:33 +01:00
Jayofelony
08e9656bb5 Merge pull request #367 from Sniffleupagus/toml_two_times_baby
Toml two times baby
2025-03-08 23:50:27 +01:00
Sniffleupagus
dbcc488900 Load dotted toml files with old toml library, new ones with tomlkit to preserve format and comments 2025-03-08 13:26:13 -08:00
Sniffleupagus
94b01b2fc7 get_bbox fails on 2.9.5. get_size works 2025-03-08 13:25:32 -08:00
Jayofelony
9b4b239deb Merge pull request #364 from wpa-2/noai
Update defaults.toml
2025-03-08 13:00:16 +01:00
wpa-2
4fc029d638 Update defaults.toml
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-03-08 10:35:45 +00:00
Jeroen Oudshoorn
9d0ada2a33 defaults.toml small edit
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2025-03-08 09:12:08 +01:00
Jeroen Oudshoorn
da156fde4b defaults.toml small edit
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2025-03-08 09:12:00 +01:00
Jeroen Oudshoorn
edaadfdbd4 auto-update using a github token, to avoid getting rate limited. This is optional
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2025-03-08 09:09:44 +01:00
Jeroen Oudshoorn
0341ac0202 Changed TOML format and parser
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2025-03-08 09:08:52 +01:00
Jayofelony
60832e788d Merge pull request #362 from B0r1s-B4d3n0v/noai
Log entry when Pwnagotchi is Re|Started
2025-03-08 07:27:41 +01:00
Jayofelony
87a51d1de7 Merge pull request #361 from wpa-2/noai
Add files via upload
2025-03-08 07:27:19 +01:00
Boris Badenov
db85c68e63 Log Pwnagotchi Re|Started
Adds a line to the log file to identify when pwnagotchi was restarted
2025-03-07 10:51:08 -06:00
wpa-2
c98745cd1c Add files via upload
Changed log interval time 

Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-03-07 14:32:06 +00:00
Jayofelony
d91fe8e17e Merge pull request #358 from JdaieLin/noai
fix: use same curves as pisugar-power-manager
2025-03-03 09:59:52 +01:00
Jdaie
8da625e7e2 fix: use same curves as pisugar-power-manager 2025-03-03 08:57:00 +08:00
Jayofelony
6bab0b36d1 Merge pull request #353 from wpa-2/noai
Makes backups work better inside windows and Linux
2025-02-27 17:55:45 +01:00
wpa-2
19de2a2d8f Update defaults.toml
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-02-26 19:13:15 +00:00
wpa-2
5d4c2e3b3a Add files via upload
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-02-26 19:12:49 +00:00
wpa-2
e7eba208bd Merge branch 'jayofelony:noai' into noai 2025-02-26 18:45:37 +00:00
wpa-2
b47371cfe6 Update defaults.toml
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-02-26 18:45:28 +00:00
Jayofelony
56b70fcc83 Merge pull request #351 from wpa-2/noai
sorry missed a line
2025-02-25 22:59:15 +01:00
wpa-2
d698c35fef Merge branch 'jayofelony:noai' into noai 2025-02-25 18:31:33 +00:00
wpa-2
1f5785f823 Update defaults.toml
Signed-off-by: wpa-2 <9049886+wpa-2@users.noreply.github.com>
2025-02-25 18:31:21 +00:00
Jayofelony
d78220b9ba Merge pull request #349 from C0d3-5t3w/patch-1
Update README.md
2025-02-25 09:44:39 +01:00
5T3W
faca5b2904 Update README.md
Twitter is now X.

Signed-off-by: 5T3W <stewy1994@gmail.com>
2025-02-24 22:57:44 -08:00
Jayofelony
234b38e4e4 Merge pull request #348 from wpa-2/noai
New autobackup plugin as default, fixes to backup scripts,
2025-02-24 18:17:23 +01:00