Predatory ESP32 Firmware
This report presents the forensic synthetic code analysis of BruceDevices/firmware, a C++ project with 6,585 GitHub stars. SynthScan v2.0 examined 219,821 lines of code across 949 source files, recording 1102 pattern matches distributed across 15 syntactic categories. The overall adjusted score of 5.8 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1102 distinct pattern matches across 15 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patch_library_conflicts.py | 61 | r'detachInterrupt\(int_pin\);', | COMMENT |
| LOW | patch_library_conflicts.py | 141 | ), | COMMENT |
| LOW | patch_library_conflicts.py | 181 | # pass POLL_COLAVOIDANCE actually runs, heavier than the lightweight TECHDETECT probe) had no | COMMENT |
| LOW | include/globals.h | 1 | #ifndef __GLOBALS__ | COMMENT |
| LOW | include/globals.h | 21 | #include <NTPClient.h> | COMMENT |
| LOW | include/globals.h | 41 | #if defined(HAS_SCREEN) | COMMENT |
| LOW | include/rotary_decoder.h | 41 | * Drop-in replacement for the RotaryEncoder library's getPosition(): | COMMENT |
| LOW | include/precompiler_flags.h | 1 | // clang-format off | COMMENT |
| LOW | include/precompiler_flags.h | 21 | #ifndef SAFE_STACK_BUFFER_SIZE | COMMENT |
| LOW | include/precompiler_flags.h | 41 | COMMENT | |
| LOW | include/precompiler_flags.h | 61 | #define TXLED GROVE_SDA | COMMENT |
| LOW | include/precompiler_flags.h | 81 | #ifndef TFT_WIDTH | COMMENT |
| LOW | include/precompiler_flags.h | 101 | #define LORA_RST -1 | COMMENT |
| LOW | include/precompiler_flags.h | 121 | #define TFT_BL -1 | COMMENT |
| LOW | include/precompiler_flags.h | 141 | #endif | COMMENT |
| LOW | include/precompiler_flags.h | 181 | #undef RF_RX_PINS | COMMENT |
| LOW | include/precompiler_flags.h | 201 | #endif | COMMENT |
| LOW | include/precompiler_flags.h | 221 | #endif | COMMENT |
| LOW | include/precompiler_flags.h | 241 | #endif | COMMENT |
| LOW | include/precompiler_flags.h | 261 | #ifndef SMOOTH_FONT | COMMENT |
| LOW | include/VectorDisplay.h | 41 | }; | COMMENT |
| LOW | include/VectorDisplay.h | 61 | #define ALIGN_TOP 't' | COMMENT |
| LOW | include/VectorDisplay.h | 81 | #define TFT_RED 0xF800 /* 255, 0, 0 */ | COMMENT |
| LOW | include/VectorDisplay.h | 101 | #define ILI9341_CYAN 0x07FF /* 0, 255, 255 */ | COMMENT |
| LOW | include/VectorDisplay.h | 121 | #define CL_DATUM 3 // Centre left, same as above | COMMENT |
| LOW | boards/marauder-touch/pins_arduino.h | 61 | #define GPS_SERIAL_RX SERIAL_RX | COMMENT |
| LOW | boards/marauder-touch/pins_arduino.h | 81 | #define NRF24_MISO_PIN SPI_MISO_PIN | COMMENT |
| LOW | boards/marauder-touch/pins_arduino.h | 101 | #define SMOOTH_FONT 1 | COMMENT |
| LOW | boards/lilygo-t-deck/pins_arduino.h | 1 | #ifndef Pins_Arduino_h | COMMENT |
| LOW | boards/lilygo-t-watch-s3/pins_arduino.h | 1 | #ifndef Pins_Arduino_h | COMMENT |
| LOW | boards/_New-Device-Model/pins_arduino.h | 61 | #define WCLK 43 | COMMENT |
| LOW | boards/_New-Device-Model/pins_arduino.h | 81 | #define CC1101_GDO0_PIN 9 | COMMENT |
| LOW | boards/_New-Device-Model/pins_arduino.h | 101 | #define USER_SETUP_LOADED 1 | COMMENT |
| LOW | boards/_New-Device-Model/pins_arduino.h | 121 | #define SDCARD_SCK 40 | COMMENT |
| LOW | boards/m5stack-cardputer/pins_arduino.h | 201 | #define LED_COUNT 1 | COMMENT |
| LOW | boards/m5stack-cores3/pins_arduino.h | 1 | #ifndef Pins_Arduino_h | COMMENT |
| LOW | boards/m5stack-cores3/pins_arduino.h | 61 | static const uint8_t ADC = 10; | COMMENT |
| LOW | boards/m5stack-cores3/pins_arduino.h | 81 | // Screen Setup | COMMENT |
| LOW | boards/m5stack-cores3/pins_arduino.h | 101 | #define SMOOTH_FONT 1 | COMMENT |
| LOW | boards/m5stack-cores3/pins_arduino.h | 121 | COMMENT | |
| LOW | boards/m5stack-cores3/interface.cpp | 1 | #include "core/bus_HAL.h" | COMMENT |
| LOW | boards/lilygo-t-display-ttgo/pins_arduino.h | 1 | #ifndef Pins_Arduino_h | COMMENT |
| LOW | boards/lilygo-t-display-ttgo/pins_arduino.h | 21 | #define SDCARD_MOSI SPI_MOSI_PIN | COMMENT |
| LOW | boards/lilygo-t-display-ttgo/pins_arduino.h | 41 | #define W5500_MISO_PIN SPI_MISO_PIN | COMMENT |
| LOW | boards/lilygo-t-display-ttgo/pins_arduino.h | 61 | #define TFT_MOSI 19 | COMMENT |
| LOW | boards/lilygo-t-display-ttgo/pins_arduino.h | 81 | COMMENT | |
| LOW | boards/lilygo-t-display-ttgo/pins_arduino.h | 101 | #define RXLED 15 | COMMENT |
| LOW | boards/lilygo-t-display-s3-pro/interface.cpp | 1 | #include "core/bus_HAL.h" | COMMENT |
| LOW | boards/lilygo-t-hmi/pins_arduino.h | 1 | #ifndef Pins_Arduino_h | COMMENT |
| LOW | boards/lilygo-t-hmi/pins_arduino.h | 21 | #define CC1101_GDO0_PIN 16 | COMMENT |
| LOW | boards/lilygo-t-hmi/pins_arduino.h | 41 | // Pins set on .ini file | COMMENT |
| LOW | boards/lilygo-t-hmi/pins_arduino.h | 61 | COMMENT | |
| LOW | boards/lilygo-t-hmi/pins_arduino.h | 81 | #define TFT_D6 45 | COMMENT |
| LOW | boards/lilygo-t-hmi/pins_arduino.h | 101 | COMMENT | |
| LOW | boards/nm-cyd-c5/pins_arduino.h | 1 | #ifndef Pins_Arduino_h | COMMENT |
| LOW | boards/nm-cyd-c5/pins_arduino.h | 41 | #define SDA1 LP_SDA | COMMENT |
| LOW | boards/nm-cyd-c5/pins_arduino.h | 61 | // I2C | COMMENT |
| LOW | boards/nm-cyd-c5/pins_arduino.h | 81 | #define TFT_HEIGHT 320 | COMMENT |
| LOW | boards/nm-cyd-c5/pins_arduino.h | 101 | #define SMOOTH_FONT 1 | COMMENT |
| LOW | boards/nm-cyd-c5/pins_arduino.h | 121 | #define RXLED 9 | COMMENT |
| 948 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/modules/wifi/wifi_recover.cpp | 18 | // ── Thermal knob ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/wifi/wifi_recover.cpp | 27 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/reverseShell/reverseShell.cpp | 19 | // ── WebSocket Event Handler ──────────────────────────────── | COMMENT |
| MEDIUM | src/modules/reverseShell/reverseShell.cpp | 68 | // ── Setup ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/reverseShell/reverseShell.cpp | 85 | // ── AP Password: bruce ───────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/reverseShell/reverseShell.cpp | 97 | // ── Web Interface ────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/reverseShell/reverseShell.cpp | 170 | // ── Main Loop ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/rf/rf_jammer.h | 6 | // ── RF Jammer modes ───────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/rf/rf_jammer.cpp | 22 | // ── Mode selection menu ───────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/rf/rf_jammer.cpp | 205 | // ── FULL POWER: Maximum duty cycle continuous TX ──────────────── | COMMENT |
| MEDIUM | src/modules/rf/rf_jammer.cpp | 276 | // ── INTERMITTENT: Varied pulse patterns + bursts ──────────────── | COMMENT |
| MEDIUM | src/modules/rf/rf_jammer.cpp | 342 | // ── NOISE STORM: CC1101 PN9 hardware random TX ───────────────── | COMMENT |
| MEDIUM | src/modules/rf/rf_jammer.cpp | 421 | // ── FREQ SWEEP: Hop around target frequency ───────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.h | 17 | // ── Maximum targets ─────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.h | 20 | // ── Device type identification ──────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.h | 28 | // ── Target structure ────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.h | 37 | // ── HID key mapping ────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.h | 101 | // ── DuckyScript key name entry ──────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.h | 108 | // ── Public functions ────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 20 | // ── Tuning Constants ──────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 26 | // ── Static module state ───────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 32 | // ── ASCII to HID scancode lookup table ────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 222 | // ── Helper: ASCII to HID ──────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 229 | // ── CRC16-CCITT for ESB packet validation ─────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 239 | // ── Target Management ─────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 594 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 595 | // ═══════════════ SCANNING UI ═══════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 596 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 715 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 716 | // ═══════════════ ATTACK EXECUTION ══════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 717 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 891 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 892 | // ═══════════════ TARGET LIST & ATTACK MENU ═════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 893 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 931 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 932 | // ═══════════════ MAIN MOUSEJACK MENU ══════════════════════════ | COMMENT |
| MEDIUM⚡ | src/modules/NRF24/nrf_mousejack.cpp | 933 | // ══════════════════════════════════════════════════════════════════ | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 169 | // ── DuckyScript key name table ────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 287 | // ── Fingerprinting ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 370 | // ── Microsoft Protocol Helpers ────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 381 | // ── Transmit with retransmission ──────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 404 | // ── Microsoft Keystroke Transmit ──────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 437 | // ── Logitech Keystroke Transmit ───────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 455 | // ── Send single keystroke (press + release) ───────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 467 | // ── Type a string as keystrokes ───────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 488 | // ── DuckyScript line parser ───────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 564 | // ── Get device type label ─────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 574 | // ── Format address as string ──────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 639 | // ── Scanning function ─────────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 742 | // ── Attack: Inject String ─────────────────────────────────────── | COMMENT |
| MEDIUM | src/modules/NRF24/nrf_mousejack.cpp | 793 | // ── Attack: DuckyScript from SD Card ──────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | sd_files/interpreter/ir2keys.js | 33 | print("waiting for IR signals...", 0 , 0); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 44 | print("received:"); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 45 | print(curr_ir_signal); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 55 | print("pressed play"); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 61 | print("pressed next"); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 67 | print("pressed prev"); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 73 | print("pressed stop"); | CODE |
| HIGH⚡ | sd_files/interpreter/ir2keys.js | 77 | print("unknown button pressed"); | CODE |
| HIGH | sd_files/interpreter/dtmf.js | 35 | print("invalid digit (skipped): " + s[i]); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | patch.py | 130 | print(f'Error: Source directory "{data_src_dir}" does not exist!') | CODE |
| LOW | patch_library_conflicts.py | 221 | except Exception as e: | CODE |
| LOW | gen_mqjs_headers.py | 73 | except Exception: | CODE |
| LOW | gen_mqjs_headers.py | 83 | except Exception: | CODE |
| LOW | gen_mqjs_headers.py | 218 | except Exception as e: | CODE |
| MEDIUM | .vscode/build_public_download.py | 91 | print(f"Error: {bin_path} not found") | CODE |
| MEDIUM | .vscode/build_public_download.py | 96 | print(f"Error: {merged_bin_path} not found") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | patch_library_conflicts.py | 112 | ' if (isr_active && int_pin < 0) { return; }\n' | CODE |
| HIGH | patch_library_conflicts.py | 140 | ' } while (int_pin >= 0 && digitalRead(int_pin) == HIGH);' | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/modules/others/mic.h | 6 | is set So we need to check if the pin was set as Input, lock its state and reset it after finish the | CODE |
| LOW⚡ | src/modules/others/clicker.cpp | 649 | // Step 1: Perform click | COMMENT |
| LOW⚡ | src/modules/others/clicker.cpp | 654 | // Step 2: Check if target reached (immediate check) | COMMENT |
| LOW⚡ | src/modules/others/clicker.cpp | 660 | // Step 3: Update statistics every second | COMMENT |
| LOW | src/modules/others/clicker.cpp | 671 | // Step 4: Responsive delay with user interrupt check | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | src/modules/others/clicker.cpp | 649 | // Step 1: Perform click | COMMENT |
| LOW⚡ | src/modules/others/clicker.cpp | 654 | // Step 2: Check if target reached (immediate check) | COMMENT |
| LOW⚡ | src/modules/others/clicker.cpp | 660 | // Step 3: Update statistics every second | COMMENT |
| LOW | src/modules/others/clicker.cpp | 671 | // Step 4: Responsive delay with user interrupt check | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | sd_files/interpreter/dino_game.js | 375 | groundX = 0; // Reset position for seamless looping | CODE |
| MEDIUM | src/core/serial_commands/rf_commands.cpp | 166 | // --- /mfcodes management on LittleFS (single-line, robust) ------------------ | COMMENT |
| MEDIUM | src/modules/rfid/ST25R3916.cpp | 2562 | // Re-select before moving to the next sector (fresh first-auth is more robust). | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | embedded_resources/web_interface/index.js | 1166 | function updateShowHideNavigatingButton() { | CODE |
| LOW | sd_files/interpreter/M5stickcplus2_arcade-games.js | 362 | function drawBreakoutGameOverScreen() { | CODE |
| LOW | sd_files/interpreter/M5stickcplus2_arcade-games.js | 398 | function drawBreakoutNextLevelScreen() { | CODE |
| LOW | sd_files/themes/Theme_Builder.html | 858 | function updateUnassignedImagesDisplay() { | CODE |
| LOW | src/modules/wifi/evil_portal.h | 10 | class CaptiveRequestHandler : public AsyncWebHandler { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | lib/TFT_eSPI/README.md | 15 | 4. An excellent new compatible library is available which can render TrueType fonts on a TFT screen (or into a sprite). | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | sd_files/BadUSB and BlueDucky/Ducky-en.html | 497 | <font size="2" style="color:#bbbdba"><i><mark>GUI</mark> is used for both: the <mark>WINDOWS(⊞)</mark> key on | CODE |
| MEDIUM | sd_files/BadUSB and BlueDucky/Ducky-en.html | 516 | <font size="2" style="color:#bbbdba"><i><b><u>ONLY</u></b> on <b>Windows</b>: <mark>CTRL-ALT</mark> is the same as | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patch.py | 122 | CODE | |
| LOW | build.py | 45 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patch.py | 66 | # Read the file in chunks to avoid memory issues | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | patch_library_conflicts.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | sd_files/themes/Theme_Builder.html | 675 | placeholder.className = 'placeholder'; | CODE |