Commit Graph
4125 Commits
Author SHA1 Message Date
Jeroen Oudshoorn 124f52c0a6 Merge remote-tracking branch 'origin/noai' into noai
# Conflicts:
#	.idea/pwnagotchi.iml
2026-07-27 21:10:00 +02:00
Jeroen Oudshoorn 39341f6525 Moved cache plugin to core functionality of Pwnagotchi.
Moved bt-tether to core functionality of Pwnagotchi.
Moved auto-tune to core functionality of Pwnagotchi.

They are no longer plugins, except for bt-tether which can still be disabled if you don't want it.

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-07-27 21:09:38 +02:00
Jeroen OudshoornandClaude Haiku 4.5 a6e283c25b config(defaults): add strategy options, remove disabled auto-tune plugin
Updated defaults.toml to reflect strategy extraction:

Added [main] configuration:
- extra_channels = 15  (number of random channels to explore per epoch)
- restrict_channels = commented example (optional: limit to specific channels)

Removed:
- [main.plugins.auto-tune] section (now moved to core pwnagotchi/strategy)

The channel selection strategy is now configured via [main] section instead of
as a plugin, making it a core infrastructure component with clear, simple
configuration options.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:36:29 +02:00
Jeroen OudshoornandClaude Haiku 4.5 22d35b5eb6 integrate(strategy): wire channel strategy into agent lifecycle
Connected pwnagotchi/strategy module to agent.py so channel selection is always active:

Changes:
1. Import Strategy in agent.py
2. Initialize strategy in Agent.__init__()
3. Wire strategy event handlers to key agent methods:
   - on_wifi_update(): called when WiFi list refreshed
   - select_next_channels(): called to set channels for next epoch
   - on_association(): track assoc interactions per channel
   - on_deauthentication(): track deauth interactions per channel
   - on_handshake(): track handshake captures per channel

Integration points:
- set_access_points(): updates strategy and selects next channels
- associate(): reports association to strategy
- deauth(): reports deauth to strategy
- _on_event_new_handshake(): reports handshake to strategy

The strategy now:
- Receives every relevant agent event
- Maintains per-channel statistics
- Selects next channels to scan based on active APs + random exploration
- Updates config['personality']['channels'] for next epoch
- Guides agent behavior through channel selection

This makes channel selection strategy a core, always-active component instead of
an optional plugin, ensuring intelligent adaptation to environment changes.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:30:20 +02:00
Jeroen OudshoornandClaude Haiku 4.5 b9e8d1484f refactor(plugins): disable auto-tune plugin - moved to core strategy module
The auto-tune plugin has been disabled (.disabled) since its core functionality
(channel selection strategy, AP tracking, statistics) is now in pwnagotchi/strategy.

Why:
- Channel selection strategy is essential, not optional
- Should not be disableable via plugin system
- Cleaner to have it as core infrastructure
- Reduces plugin complexity

Users who want advanced tuning/presets can recreate the web UI as a separate plugin
that reads from the new Strategy facade, but that's now optional, not essential.

Original: auto-tune.py.backup for reference
Disabled: auto-tune.py.disabled (won't be loaded by plugin system)
New core: pwnagotchi/strategy/ module (always active)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:27:50 +02:00
Jeroen OudshoornandClaude Haiku 4.5 9fa3264440 refactor(strategy): extract auto-tune core logic into pwnagotchi/strategy module
Extracted intelligent channel selection strategy from auto-tune plugin into core
as pwnagotchi/strategy/ module with 3 focused components:

1. channels.py: ChannelStrategy
   - Selects channels for each epoch (active + extra unscanned)
   - Builds on active_channels and explores new areas
   - Handles channel list repopulation from config/agent

2. statistics.py: ChannelStatistics
   - Tracks per-channel statistics (AP counts, interactions)
   - Maintains known AP database
   - Manages active vs unscanned channel lists
   - Records interactions (assoc, deauth, handshakes)

3. __init__.py: Strategy facade
   - Unified entry point for agent integration
   - Event handler dispatch
   - Public API for stats access

Key changes:
- Strategy is now ALWAYS active (not optional like plugin)
- Personality/config loaded from config.toml, not plugin options
- No web UI or preset management (core only)
- Clean event integration with agent
- Removed ~600 lines of UI/preset code

Auto-tune.py is now DISABLED. Original backed up as auto-tune.py.backup.

The strategy replaces the removed RL-based AI with intelligent heuristics:
- Always scan active channels (high capture probability)
- Explore unscanned channels (discovery)
- Track statistics to guide behavior
- Adapt to environment changes

Configuration in config.toml:
    [main]
    extra_channels = 15
    restrict_channels = [1, 6, 11]  # optional

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:27:38 +02:00
Jeroen OudshoornandClaude Haiku 4.5 5c1d342893 refactor(bluetooth-ui): restore full HTML template in thin plugin wrapper
Updated bt-tether-thin.py to include the complete original HTML interface with:
- Full styling (dark theme, responsive design)
- Connection status monitoring with real-time updates
- Trusted devices summary
- Device discovery and scanning UI
- Internet connectivity testing
- Live log viewer with auto-scroll
- Interactive control buttons (Connect/Disconnect/Pair/Scan)

The simplified template has been replaced with the full feature-rich version,
maintaining 100% visual and functional parity with the original plugin while
delegating core Bluetooth logic to the modular pwnagotchi.bluetooth service.

This ensures a smooth migration path: users can simply rename bt-tether-thin.py
to bt-tether.py once testing is complete, with no loss of functionality.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:23:15 +02:00
Jeroen OudshoornandClaude Haiku 4.5 0b87b1b472 refactor(bluetooth): extract bt-tether core logic into reusable module
Split the monolithic 5000+ line bt-tether plugin into:

1. Core module (pwnagotchi/bluetooth/) with 7 focused submodules:
   - device.py: Device state and validation
   - connection.py: Core Bluetooth operations (pairing, connect, disconnect)
   - network.py: PAN interface and network management
   - agent.py: Pairing agent lifecycle
   - monitor.py: Connection monitoring and auto-reconnect
   - ui.py: Display rendering and status caching
   - __init__.py: Service facade with public API

2. Thin plugin wrapper (bt-tether-thin.py):
   - Delegates to BluetoothService
   - Reduced from 5000+ to ~750 lines
   - Maintains plugin interface compatibility
   - Handles webhook routing and event dispatch

Benefits:
- Core Bluetooth logic is now testable and reusable
- Clear separation of concerns (each module has single responsibility)
- Non-blocking UI updates via UICache pattern
- Proper error handling and timeout management
- Threading/locking concerns isolated by module
- Formal event system for plugin-core communication

Original bt-tether.py backed up as bt-tether.py.backup for reference.

Fixed security issue: replaced os.system() command injection in handler.py with subprocess.run()

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-07-27 17:19:57 +02:00
JayofelonyandGitHub a15ae8fcf4 Merge pull request #586 from BraedenP232/patch-1
Fix AttributeError in wpa-sec plugin when skipping failed uploads
2026-07-09 23:16:47 +02:00
Bready2CrumbleandGitHub 4a5781a1c6 fix(wpa-sec): use set.add() instead of list.append() for skip_until_reload
skip_until_reload is initialized as a set, but on_internet_available called .append() on it, which sets don't support. This raised an AttributeError whenever an upload failed and the handshake needed to be skipped until reload, masking the original upload error in the logs

Signed-off-by: Bready2Crumble <83258877+BraedenP232@users.noreply.github.com>
2026-07-08 15:32:31 -06:00
JayofelonyandGitHub bfd84d7a2a Merge pull request #573 from C0d3-5t3w/noai
Update README.md
2026-04-21 01:11:30 +02:00
5T3WandGitHub e550b2a9cf Update README.md 2026-04-18 22:58:17 -07:00
Jeroen Oudshoorn 6b306ffbde Merge remote-tracking branch 'origin/noai' into noai 2026-03-28 08:40:50 +01:00
Jeroen Oudshoorn 757f3ce596 Small updates 2026-03-28 08:40:45 +01:00
JayofelonyandGitHub e0b79795fe Create config-32bit
Signed-off-by: Jayofelony <oudshoorn.jeroen@gmail.com>
2026-03-28 08:35:34 +01:00
JayofelonyandGitHub 991bfd6459 Create config-64bit
Signed-off-by: Jayofelony <oudshoorn.jeroen@gmail.com>
2026-03-28 08:34:56 +01:00
Jeroen Oudshoorn 1d21917a80 Update pyproject.toml 2026-03-27 11:32:57 +01:00
Jeroen Oudshoorn 4d1603a52e Update Makefile 2026-03-27 10:45:37 +01:00
Jeroen Oudshoorn 70b5b26977 Add pwn-gen to Pwnagotchi repo 2026-03-27 10:43:56 +01:00
Jeroen Oudshoorn 5c59f540c9 Add files and folders to gitignore 2026-03-27 10:30:58 +01:00
Jeroen Oudshoorn eebe4e69d7 Add bt-tether config settings
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-26 10:21:28 +01:00
Jeroen Oudshoorn ab33e0eb79 Add bt-tether config settings
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-26 10:12:01 +01:00
Jeroen Oudshoorn 693750ea7d Updated
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-26 10:10:03 +01:00
Jeroen Oudshoorn c166942586 feat(ui): enhance web interface with new logtail and web configuration features
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-26 09:33:31 +01:00
Jeroen Oudshoorn 7999a0455f feat(ui): enhance web interface with new logtail and web configuration features
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-26 09:32:40 +01:00
Jeroen Oudshoorn 36632bcbd5 feat(ui): enhance web interface with new logtail and web configuration features
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-25 20:58:29 +01:00
Jeroen Oudshoorn d98143b022 feat(display): add support for whisplay display type and update related configurations
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-25 20:53:07 +01:00
Jeroen Oudshoorn aad8c01f65 Update to 2.9.5.5
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-25 19:25:43 +01:00
Jeroen Oudshoorn 01c6ab856d Revert to 2.9.5.4
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-25 19:01:56 +01:00
Jeroen Oudshoorn 214658bbcf Revert "Add handshakes-dl plugin with network map and handshake tracking"
This reverts commit 0d5a0ccb01.
2026-03-25 18:20:14 +01:00
Jeroen Oudshoorn 5594fa59ff Revert "feat(fix_services): add interface name validation helper"
This reverts commit 45d846c348.
2026-03-25 18:20:13 +01:00
Jeroen Oudshoorn b4727bcf87 Revert "fix(fix_services): add threading lock around LASTTRY and isReloadingMon"
This reverts commit f894649e51.
2026-03-25 18:20:11 +01:00
Jeroen Oudshoorn 6e8dbaf90c Revert "fix(fix_services): merge duplicate pattern handlers 5 and 6"
This reverts commit 3962c75730.
2026-03-25 18:20:10 +01:00
Jeroen Oudshoorn 4ec96bdc85 Revert "fix(fix_services): update LASTTRY in all on_epoch pattern handlers"
This reverts commit c2e61a1517.
2026-03-25 18:20:03 +01:00
Jeroen Oudshoorn ead26b5a3f Revert "fix(fix_services): remove unused imports Text, BLACK, fonts"
This reverts commit 36647cb367.
2026-03-25 18:19:54 +01:00
Jeroen Oudshoorn 14d2c68980 Revert "fix(fix_services): fix display null reference crash in on_epoch"
This reverts commit 0fd715b554.
2026-03-25 18:19:49 +01:00
Jeroen Oudshoorn 4ee52614cf Revert "fix(fix_services): remove dead code in on_ui_setup"
This reverts commit bbf1d95bfc.
2026-03-25 18:19:47 +01:00
Jeroen Oudshoorn b42d01ddc2 Revert "fix(fix_services): remove unused Popen in on_ready (resource leak)"
This reverts commit 283be16549.
2026-03-25 18:19:45 +01:00
Jeroen Oudshoorn 9080a4c768 Revert "feat(pisugarx): implement all stub methods for PiSugar3"
This reverts commit 73f8524af4.
2026-03-25 18:19:41 +01:00
Jeroen Oudshoorn 17bb0c3c53 Revert "fix(pisugarx): improve I2C thread safety, error recovery, and write protection"
This reverts commit 380d05cca9.
2026-03-25 18:19:40 +01:00
Jeroen Oudshoorn b927aff704 Revert "fix(pisugarx): prevent double voltage append with charge protection"
This reverts commit 1fbfe4bc86.
2026-03-25 18:19:38 +01:00
Jeroen Oudshoorn 71c704047a Revert "fix(pisugarx): guard against None self.ps in on_loaded and on_ui_update"
This reverts commit 2246a91590.
2026-03-25 18:19:37 +01:00
Jeroen Oudshoorn add1f51b91 Revert "fix(pisugarx): correct model name mismatch in web UI"
This reverts commit 55f294ec77.
2026-03-25 18:19:36 +01:00
Jeroen Oudshoorn b2e24a8e48 Revert "Add PiSugar 3 shutdown/startup scripts and watchdog"
This reverts commit dff77e105d.
2026-03-25 18:19:29 +01:00
Jeroen Oudshoorn b661286545 Revert "Fix whitelist not filtering passively captured handshakes"
This reverts commit f2c73f5bbe.
2026-03-25 18:19:18 +01:00
Jeroen Oudshoorn 249cac0420 Revert "Fix auto-tune plugin: history compat, XSS, channel dedup, defaults"
This reverts commit 3c8aa55a57.
2026-03-25 18:19:17 +01:00
Jeroen Oudshoorn 52c1306719 Revert "Optimize handshake capture: fix bugs and improve attack efficiency"
This reverts commit 8c1c51f158.
2026-03-25 18:19:15 +01:00
Jeroen Oudshoorn 103f473376 Revert log changes
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
2026-03-24 21:44:45 +01:00
JayofelonyandGitHub 7cfc0cc9c9 Merge pull request #370
support syslog or console logging instead of files. disable session s…
2026-03-24 21:37:53 +01:00
JayofelonyandGitHub 2d8f61dddd Merge pull request #306
added ui.faces.scale = # to png faces
2026-03-24 21:37:08 +01:00