Feat/custom implementation#2457
Open
DUptain1993 wants to merge 63 commits into
Open
Conversation
Add new board nm-cyd-c5, new Cheap Yellow Display with ESP32-C5 which support dual band wifi ( 2.4G/5.8G)
feat(iButton): enhance UI/UX and add file save/load support
🫡 fix overloaded bulk upload
Add function that checks if folder exists
Add WDGoWars (wdgwars.pl) as an alternative upload target alongside existing Wigle integration. Uses the /api/upload-csv endpoint with X-API-Key authentication and multipart CSV upload. New files: wdgwars.h/cpp, config field wdgwarsApiKey, menu options "WDG Upload" / "WDG Up All" in file browser for CSV files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Default wdgwarsApiKey now shows a hint pointing to wdgwars.pl/profile. Validation checks for 64-char hex key instead of empty string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
update README.md to use new wiki
feat: Add WDGoWars (wdgwars.pl) upload support for wardriving
* set default board * Fix PSRAM connection * FIX Reapply stored brightness after post-setup GPIO initialization * Fix GIF resource management and improve frame playback logic * Fix tone fuction in js interpreter. Enhance audio codec control for speaker and microphone, adding timer management and improved volume handling --------- Co-authored-by: Pirata <104320209+bmorcelli@users.noreply.github.com>
General Improvement
pn532 spi interface change pins
Implement NetCut ARP Module for Bruce Firmware with device scanning, ARP poisoning, and troll functionality.
Added NetCut ARP Module header file for device management and ARP operations.
Integrate NetCut module entry point into the WiFi options menu.
Refactor device restoration process for clarity and efficiency.
Synchronized bulk restoration logic with individual restoration to achieve instant connectivity recovery. The system now only targets affected devices during 'Resume All' and exit cleanup, eliminating redundant delays for a seamless experience.
feat(wifi): NetCut ARP Module (Inspired by Arcai.com)
Reduce potential buffer overflow situations
Author
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR expands firmware capabilities (NetCut ARP module, WDGoWars CSV upload, YModem serial receive, JS WiFi/SubGHz extensions) while refactoring multiple UI screens to use common display helpers, improving safety of string formatting, and adding new board/build configurations (LTO + new targets).
Changes:
- Added new networking + connectivity features (NetCut header/API, wdgwars uploader, YModem receive command, JS bindings for WiFi raw frames/promiscuous + SubGHz preamble).
- Refactored/standardized many module UIs and improved robustness (snprintf/strlcpy, display loopOptions “disabled” support, status bar icons).
- Updated build/boards (new Elecrow + nm-cyd-c5 targets, PSRAM settings, LTO/linker tuning, workflow/docker env lists).
Reviewed changes
Copilot reviewed 91 out of 95 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/modules/wifi/wifi_recover.cpp | Removes extra UI padding / stale timing UI at end of handshake cracking. |
| src/modules/wifi/tcp_utils.cpp | Updates TCP listen/client UI to use common border/title styling. |
| src/modules/wifi/socks4_proxy.cpp | Standardizes SOCKS4 proxy screen layout and messaging. |
| src/modules/wifi/sniffer.cpp | Safer formatting (snprintf, strlcpy) and updated “Sniffing Started” UI output. |
| src/modules/wifi/responder.cpp | Refactors responder UI layout and adds clearer state transitions. |
| src/modules/wifi/netcut.h | Introduces NetCut module public API + documentation and constants. |
| src/modules/wifi/karma_attack.h | Fixes duplicate header terminator. |
| src/modules/wifi/karma_attack.cpp | Minor formatting cleanup and removes unused helper. |
| src/modules/wifi/evil_portal.h | Whitespace/guard cleanup. |
| src/modules/wifi/clients.cpp | Standardizes SSH/Telnet UI outputs and cursor behavior. |
| src/modules/rfid/PN532.cpp | Uses configurable PN532 SPI pin bus instead of fixed macros. |
| src/modules/rf/rf_utils.h | Adds CC1101 preamble setter API. |
| src/modules/rf/rf_utils.cpp | Implements CC1101 preamble register configuration helper. |
| src/modules/rf/rf_spectrum.cpp.bak | Adds backup file containing RF spectrum code snapshot. |
| src/modules/rf/rf_scan.cpp | Replaces strcpy with strlcpy for safe buffer copy. |
| src/modules/rf/rf_jammer.h | Introduces jammer mode enum/state fields and new mode handlers. |
| src/modules/others/ibutton.h | Adds result enum, pragma once, removes old read/write declarations. |
| src/modules/others/ibutton.cpp | Major rewrite: buffered read/CRC status, save/load to storage, UI menu actions. |
| src/modules/others/audio.cpp | Adds optional M5Unified tone path and correct “silent tone” delay behavior. |
| src/modules/ir/ir_read.h | Adds emulate-mode state tracking and cleans comments/formatting. |
| src/modules/ir/ir_read.cpp | Adds IR emulate flow and protocol naming helper; cleans legacy comments. |
| src/modules/gps/wdgwars.h | Adds WDGoWars uploader class interface for wardriving CSV. |
| src/modules/gps/wdgwars.cpp | Implements HTTPS multipart upload of CSVs with progress + auto-delete. |
| src/modules/gps/wardriving.cpp | Ensures GPS RX pin is set to INPUT before Serial begin. |
| src/modules/gps/gps_tracker.cpp | Ensures GPS RX pin is set to INPUT before Serial begin. |
| src/modules/ble_api/services/BLESerialService.h | Adds SerialDevice::read override in BLE serial service. |
| src/modules/ble_api/services/BLESerialService.cpp | Implements read() by consuming first byte from characteristic value. |
| src/modules/bjs_interpreter/wifi_js.h | Adds JS bindings for raw frame TX and promiscuous mode toggle. |
| src/modules/bjs_interpreter/wifi_js.cpp | Implements new WiFi JS bindings (sendRawFrame/setPromiscuous). |
| src/modules/bjs_interpreter/subghz_js.h | Adds SubGHz preamble binding; modifies TX API declarations. |
| src/modules/bjs_interpreter/subghz_js.cpp | Calls setMHZ on frequency change; adds preamble setter binding. |
| src/modules/bjs_interpreter/mqjs_stdlib.c | Exposes new JS APIs for BadUSB mouse and WiFi/SubGHz additions. |
| src/modules/bjs_interpreter/badusb_js.h | Adds JS declarations for mouse actions. |
| src/modules/bjs_interpreter/badusb_js.cpp | Implements JS mouse actions (USB HID builds only). |
| src/modules/badusb_ble/ducky_typer.h | Exposes USB HID keyboard/mouse instances when USB_as_HID is enabled. |
| src/modules/badusb_ble/ducky_typer.cpp | Switches USB HID creation to shared instances; adds richer keyboard UI/queueing. |
| src/modules/NRF24/nrf_spectrum.h | Simplifies header and includes RF24. |
| src/modules/NRF24/nrf_spectrum.cpp.bak | Adds backup file containing prior enhanced spectrum implementation. |
| src/modules/NRF24/nrf_spectrum.cpp | Replaces enhanced analyzer with simplified 80-channel visualization. |
| src/modules/NRF24/nrf_jammer.h | Expands jammer config fields (strategy/bursts/random hop). |
| src/main.cpp | Re-applies brightness post-init and pins tasks to cores (when available). |
| src/core/wifi/wifi_mac.cpp | Uses snprintf for safe MAC formatting. |
| src/core/wifi/wg.cpp | Improves WireGuard UI flow and replaces ad-hoc display with displayError + key wait. |
| src/core/wifi/webInterface.cpp | UI refactor for WebUI screen + snprintf response buffer safety. |
| src/core/utils.cpp | Replaces sprintf with snprintf in formatTimeDecimal. |
| src/core/type_convertion.cpp | Enlarges temp buffer to accommodate null terminator safely. |
| src/core/settings.cpp | Initializes am to avoid undefined value usage. |
| src/core/serial_commands/util_commands.cpp | Trims whitespace; minor formatting cleanup. |
| src/core/serial_commands/storage_commands.cpp | Fixes filepath/size arg handling; adds YModem receive implementation + CLI command. |
| src/core/serial_commands/settings_commands.cpp | Adds serial setting for wdgwarsApiKey. |
| src/core/sd_functions.h | Adds folderExists declaration. |
| src/core/sd_functions.cpp | Adds folderExists implementation and WDGoWars upload actions in file picker. |
| src/core/net_utils.cpp | Uses snprintf for MAC formatting. |
| src/core/menu_items/WifiMenu.cpp | Adds NetCut menu entry. |
| src/core/menu_items/RFMenu.cpp | Consolidates jammer menu entry. |
| src/core/menu_items/FileMenu.cpp | Adds “Connect” submenu for serial/file sharing features. |
| src/core/menu_items/EthernetMenu.cpp | Reworks ethernet icon drawing for clearer scalable rendering. |
| src/core/menu_items/ConfigMenu.cpp | Removes “Install App Store” option from config menu. |
| src/core/menu_items/AppsMenu.cpp | Updates apps icon design. |
| src/core/main_menu.cpp | Reorders main menu item list. |
| src/core/display.h | Adds SD status icon function declaration and cleans Gif members. |
| src/core/display.cpp | Adds disabled option navigation in loopOptions, centered status icons, safer Gif handling. |
| src/core/connect/esp_connection.cpp | Uses snprintf for MAC hex string formatting. |
| src/core/configPins.h | Adds PN532 SPI bus configuration and setter. |
| src/core/configPins.cpp | Adds PN532 pins JSON import/export + validation and setter. |
| src/core/config.h | Changes dimmer default and adds wdgwarsApiKey config field + setter declaration. |
| src/core/config.cpp | Persists wdgwarsApiKey in config file and adds setter implementation. |
| src/core/USBSerial/USBSerial.h | Implements SerialDevice::read pass-through. |
| platformio.ini | Enables LTO flags and adds flto_prep script; sets NimBLE-Arduino version; env list tweaks. |
| patch.py | Adds request timeouts for JS/HTML minifier calls. |
| include/globals.h | Adds Option::enabled support; extends Option constructor. |
| include/VectorDisplay.h | Fixes string bounds and adds explicit null termination. |
| include/SerialDevice.h | Adds pure virtual read() to SerialDevice interface. |
| flto_prep.py | Removes -fno-lto from link flags to allow full LTO. |
| embedded_resources/web_interface/index.css | Improves upload dialog responsiveness and scrolling. |
| docker/run_all_envs.sh | Adds new Elecrow envs and fixes arithmetic test syntax. |
| boards/pinouts/pins_arduino.h | Adds Elecrow and nm-cyd-c5 pinout includes. |
| boards/nm-cyd-c5/pins_arduino.h | Adds new nm-cyd-c5 Arduino variant pin definitions. |
| boards/nm-cyd-c5/nm-cyd-c5.ini | Adds PlatformIO env for nm-cyd-c5. |
| boards/nm-cyd-c5/interface.cpp | Adds nm-cyd-c5 interface hooks (GPIO, brightness, touch, input). |
| boards/nm-cyd-c5/connections.md | Documents nm-cyd-c5 wiring/pinouts. |
| boards/m5stack-sticks3/m5stack-sticks3.ini | Enables PSRAM + related build flags for sticks3. |
| boards/m5stack-sticks3/interface.cpp | Improves codec speaker/mic control with delayed shutdown and direct I2C config. |
| boards/elecrow/pins_arduino.h | Adds Elecrow Arduino variant pin definitions. |
| boards/elecrow/interface.cpp | Adds Elecrow interface hooks (touch, brightness PWM, powerOff). |
| boards/elecrow/elecrow.ini | Adds Elecrow board envs (2.4/2.8/3.5/v2.2 + launcher variants). |
| boards/_boards_json/m5stack-sticks3.json | Updates board JSON memory type for qio_opi. |
| boards/_boards_json/elecrow-esp32-24B.json | Adds new board definition JSON for Elecrow base. |
| .gitignore | Ignores IDE and AI workspace folders (.idea, .ai). |
| .github/workflows/manual_build_sel_env.yml | Installs multilib deps for builds in manually-triggered workflow. |
| .github/workflows/buil_parallel.yml | Adds new envs and adjusts launcher env build list. |
Comments suppressed due to low confidence (7)
src/modules/bjs_interpreter/subghz_js.h:1
- native_subghzTxSetup is declared twice, which can cause redefinition/ODR issues depending on compilation units and is certainly confusing. Remove the duplicate declaration and keep a single prototype.
src/modules/bjs_interpreter/wifi_js.cpp:1 - The JSValue returned from JS_GetPropertyStr must be released (JS_FreeValue) to avoid leaking references in QuickJS. Ensure
datais always freed on all paths (including when_dataisn't a typed array).
src/core/serial_commands/storage_commands.cpp:1 - This parses YModem header fields using strlen() on untrusted data without ensuring a null terminator exists within the 128-byte block. That can read past
blockBuffer(OOB read) and potentially crash. Use bounded parsing (e.g., strnlen with max=blockSize) and verifysizeStrremains within the block before dereferencing/parsing.
src/modules/NRF24/nrf_spectrum.cpp:1 - There are a few concrete issues here: (1)
channelis notstatic, which unnecessarily exports a global symbol and risks link-time name collisions. (2)_BWcan evaluate to 0 on smaller displays (tftWidth < CHANNELS), making all x positions 0 and collapsing drawing into a single column. (3)scanChannels()always allocates/builds a String as ifweb==true, ignoring thewebflag, which increases heap churn in the hot loop. Make the bufferstatic, compute a minimum bar width (>=1), and only build the JSON string whenwebis true.
src/core/display.cpp:1 - If only one option is enabled,
findNextEnabled()can return the current index, andnextEnabled <= indexwill incrementdevModeCounterwithout any wrap-around or actual movement. This can unintentionally trigger dev-mode behavior just by pressing Next on a single enabled item. Increment the counter only when (a) navigation wraps (nextEnabled < index) and (b) the index actually changes.
src/modules/rf/rf_spectrum.cpp.bak:1 - The repository now contains a
.cpp.baksource snapshot. Keeping backup/source-history files in-tree makes maintenance harder and can confuse future refactors and searches (there is also annrf_spectrum.cpp.bak). Prefer removing these from the PR, or moving them to documentation (or relying on git history).
src/modules/rf/rf_utils.cpp:1 - Masking with
& 0x07silently wraps invalid values (e.g., 8 becomes 0), which can make scripting/JS bindings behave unexpectedly. Prefer clamping to [0..7] (or returning an error/status to the caller) so invalid inputs are reported rather than silently changing behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+360
to
+361
| count++; | ||
| log_e("Fail"); |
| String startupApp = ""; | ||
| String startupAppJSInterpreterFile = ""; | ||
| String wigleBasicToken = ""; | ||
| String wdgwarsApiKey = "your 64-char hex key from wdgwars.pl/profile"; |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Types of Changes
Verification
Testing
Linked Issues
User-Facing Change
Further Comments