ON NO! Someone put an RPG in a packet sniffer
……
--[ 1 - WHAT THE HELL IS THIS
three questions every operator asks:
1. "what does it do?"
2. "is it legal?"
3. "why does the pig look disappointed in me?"
----[ 1.1 - THE ELEVATOR PITCH
PORKCHOP runs on M5Cardputer (ESP32-S3, 240MHz, 8MB flash).
it turns a pocket keyboard into a WiFi pentesting companion with:
- promiscuous mode packet capture and EAPOL extraction
- GPS wardriving with WiGLE v1.6 export
- 2.4GHz spectrum analysis with client tracking
- BLE notification spam (Apple/Android/Samsung/Windows)
- beacon injection with vendor IE fingerprinting
- device-to-device sync via ESP-NOW (PigSync)
- a personality system with opinions about your choices
it's a learning tool for WiFi security research.
the difference between tool and weapon is the hand holding it.
wink. wink.
----[ 1.2 - THE LINEUP (what you're getting into)
words are cheap. pixels are evidence.
THE PIG IN THE FLESH:
*the pigs. awake. judging. 240x135 pixels of unsolicited opinions.*
THE HARDWARE NAKED:
*cardputer ADV + CapLoRa868. GPS + LoRa on a keyboard.*
*smaller than your phone. more opinions than your family.*
*the full loadout. everything the pig needs to judge your neighborhood.*
(photos missing? we're working on it. the pig doesn't pose for free.
the horse refused the photoshoot entirely. barn lighting was wrong.)
----[ 1.3 - HARDWARE SPECS
M5Cardputer (M5Stack StampS3):
(EAPOL has M1, M2, M3, M4. the hardware is M5.
the fifth message. the one the protocol never sent.
we are the frame after the handshake.)
- ESP32-S3FN8: 240MHz dual-core, 512KB SRAM, 8MB flash
- NO PSRAM (~300KB usable heap. every byte matters.)
- 240x135 IPS LCD (ST7789V2)
- QWERTY keyboard (56 keys)
- SD card slot (FAT32, shared SPI bus with CapLoRa)
- NeoPixel LED (GPIO 21)
- USB-C (power + serial)
Optional:
- GPS module: AT6668/ATGM336H (Grove port G1/G2 or CapLoRa)
- CapLoRa868 module (G15/G13 GPS, SX1262 LoRa shares SD SPI)
- Cardputer ADV: BMI270 IMU enables dial mode in Spectrum
- your legs, for wardriving. no judgment on wheels.
GET THE HARDWARE (the part where we sell out):
look. we're going to be transparent here.
these are affiliate links. we get a cut.
you get a pig. capitalism works (sometimes).
the pig doesn't mass-produce itself.
the pig needs a body. the body needs a store.
the store needs a link. the link needs a click.
you see where this is going.
M5Stack Cardputer ADV (the pig's body):
https://shop.m5stack.com/products/m5stack-cardputer-adv-version-esp32-s3/?ref=xqezhcga
CapLoRa 1262 (GPS + LoRa module, the pig's sense of direction):
https://shop.m5stack.com/products/cap-lora-1262-for-cardputer-adv-sx1262-atgm336h?ref=xqezhcga
buying through these links funds:
1. coffee (which becomes code)
2. code (which becomes bugs)
3. bugs (which become trauma)
4. trauma (which becomes coffee)
5. the circle continues. you're an investor now.
not buying? also valid. the pig judges purchases,
not people. clone it, build it, source it however.
open source means open source.
but if you DO click... the pig remembers its friends.
----[ 1.4 - ARCHITECTURE (for the silicon gourmets)
THE CORE:
cooperative main loop. porkchop.update() (SFX ticks inside),
Display::update(), Mood::update(). the pig's vital organs.
single PorkchopMode enum, 24 states. one mode lives. the others wait.
the pig is a finite state machine with infinite opinions.
the horse is a barn with load-bearing feelings.
THE MEMORY WAR:
no PSRAM means ~300KB internal SRAM for everything.
TLS needs ~35KB contiguous (kMinContigForTls in heap_policy.h).
WiFi driver init needs ~70KB (why preInitWiFiDriverEarly() exists).
the heap fragments like your relationship with sleep.
HEAP CONDITIONING:
boot runs a 5-phase ritual: frag blocks (50x1KB), struct blocks
(20x3KB), TLS test allocs (26KB, 32KB, 40KB). exploits ESP-IDF's
TLSF allocator for O(1) coalescing. the result: a clean brain
for TLS handshakes. percussive maintenance for memory.
the horse calls this "barn defragmentation."
the barn denies having a defragmentation problem.
the barn is the horse. denial is structural.
HEAP MONITORING:
heap_health.h samples every 1s. auto-triggers conditioning when
health drops below 65%, clears when it recovers above 75%.
adaptive cooldown: 15-60s between rounds (scales with heap state).
the heart bar at the bottom of the screen is heap health.
100% = clean. 0% = swiss cheese. the pig's blood pressure, basically.
THE EVENT BUS:
max 32 queued events, 16 processed per update tick.
MODE_CHANGE, ML_RESULT, GPS_FIX, GPS_LOST,
HANDSHAKE_CAPTURED, NETWORK_FOUND, DEAUTH_SENT,
ROGUE_AP_DETECTED, OTA_AVAILABLE, LOW_BATTERY.
the pig processes feelings through a state machine.
the horse processes feelings through a k-hole.
DUAL-CORE PATTERN:
WiFi promiscuous callbacks run on core 1 (WiFi task).
they CANNOT allocate memory or call Serial. instead:
callback sets volatile flags + writes to static pools.
main loop on core 0 checks flags and processes safely.
this is the deferred event pattern. it keeps the WDT happy.
WDT = Watchdog Timer. also What Did (The pig) Think.
STATIC POOLS:
OINK pre-allocates PendingHandshakeFrame pendingHsPool[4]
(~13KB in BSS). permanent. std::atomic indices for lock-free
producer/consumer between WiFi task and main loop.
the pig pays rent on memory it might never use.
NetworkRecon:
shared background scanning service. OINK, DONOHAM, SPECTRUM,
and WARHOG all consume the same getNetworks() vector.
spinlock mutex with RAII CriticalSection wrapper.
channel hop order: 1, 6, 11, then 2-5, 7-10, 12-13.
max 200 networks tracked. the pig has limits.
(200 is generous. the heap disagrees.)
BOOT GUARD:
RTC memory tracks rapid reboots. 3 in 60 seconds = force IDLE.
crash loops get the nuclear option. the pig learns from pain.
the horse calls this progress.
------------------------------------------------------------------------
--[ 2 - MODES (what the pig does)
one keypress from IDLE. zero menus. zero friction.
each mode changes the pig's vocabulary.
this is not a bug. this is character development.
----[ 2.1 - OINK MODE (active hunt) [O]
the pig goes rowdy. opinions about APs become actionable.
snout to the wire. tusks out.
CAPABILITIES:
- channel hop across 2.4GHz (13 channels, adaptive timing)
- promiscuous mode 802.11 frame capture
- EAPOL handshake extraction (M1-M4, validates sequence)
- PMKID extraction from RSN IE in M1 frames
(the AP just volunteers it. trust issues are real.)
- deauth (Reason 7) + disassoc (Reason 8) with jitter
(randomized inter-frame timing. less predictable to WIDS.
the pig appreciates subtlety. the timing appreciates rank.)
- PMF detection: Protected Management Frames networks
get marked immune. the pig respects armor.
- targeted client deauth (up to 20 clients per network)
- broadcast disassoc alongside broadcast deauth
(some devices ignore deauth but fold to disassoc.
the pig covers all the exits.)
- hashcat 22000 export (.22000 files, zero preprocessing)
- PCAP export with radiotap headers (Wireshark-ready)
- auto-cooldown on targets (no spam, surgical precision)
- smart target selection (priority scoring: RSSI, activity,
client count, beacon stability)
LOCK-ON DISPLAY:
target SSID (or ), client count,
capture progress (M1/M2/M3/M4 indicators),
quality score, beacon interval EMA.
BOAR BROS: press [B] to whitelist a network.
bros get observed, not attacked. the pig has honor.
manage in SYSTEM > BOARBROS. max 50 networks.
zero heap allocation (fixed array in BSS).
SEAMLESS TOGGLE: press [D] to flip into DO NO HAM.
same radio state. different conscience.
----[ 2.2 - DO NO HAM (passive recon) [D]
the pig goes zen. zero transmissions. pure observation.
the ether provides to those who wait.
CAPABILITIES:
- promiscuous receive ONLY (zero TX, zero deauth)
- adaptive channel timing with state machine:
HOPPING = scanning all channels (250ms primary, 150ms secondary)
DWELLING = found activity, staying for SSID backfill (300ms)
HUNTING = partial EAPOL detected, extended dwell (600ms)
IDLE_SWEEP = dead channels, fast sweep (120ms minimum)
- channel stats track beacons/EAPOL per channel
primary channels (1, 6, 11) get longer dwell times
dead channels (zero beacons across full cycle) trigger IDLE_SWEEP
- passive PMKID catches (APs volunteer PMKIDs in M1 frames.
you just have to be patient enough to hear them confess.)
- passive handshake capture from natural reconnects
- incomplete handshake tracking (shows missing frames,
max 20 tracked, 60s age-out, automatic revisit)
- some achievements here reward patience over violence.
the rarest catches go to the stillest hunters.
press [O] to flip back to OINK.
the pig remembers which side you chose.
----[ 2.3 - SGT WARHOG (wardriving) [W]
the pig goes tactical. salutes things.
starts talking about sectors and objectives.
CAPABILITIES:
- continuous AP scanning with GPS correlation
- WiGLE CSV v1.6 export (WigleWifi-1.6 format)
- internal CSV with extended fields
- dedup bloom filter (no duplicate entries.
the pig doesn't double-count. the pig has integrity.)
- distance tracking for XP (your legs = XP)
- capture marking for bounty system
- file rotation for session management
- direct-to-disk writes (no entries[] accumulation.
RAM is for living, not for hoarding.)
BOUNTY SYSTEM: wardriven networks become targets for
PigSync. your s3rloin companion can hunt what you found.
max 15 bounty BSSIDs per sync payload.
manage in LOOT > BOUNTY.
FILES: /m5porkchop/wardriving/*.wigle.csv
no GPS? pig still logs. coordinates read 0.000000.
technically accurate. spiritually devastating.
get GPS. the pig deserves latitude.
----[ 2.4 - HOG ON SPECTRUM (RF analysis) [H]
pure concentration. the pig does math now.
CAPABILITIES:
- 2.4GHz spectrum visualization (channels 1-13)
- gaussian lobes per network (RSSI = height)
- noise floor animation at baseline
- waterfall display (historical spectrum, push per update)
- VULN indicator (WEP/OPEN networks. still? in the wild? respect.)
- BRO indicator (networks in boar_bros.txt)
- filter modes: ALL / VULN / SOFT (no PMF) / HIDDEN
- render snapshot buffer (64 networks, heap-safe)
- packet-per-second counter (callback-safe volatile)
DIAL MODE (Cardputer ADV only):
BMI270 IMU detected = tilt-to-tune channel selection.
hold device upright, tilt to pan channels 1-13.
lerped smooth display. hysteresis for FLT/UPS detection.
[SPACE] toggles channel lock in dial mode.
(original Cardputer lacks IMU. dial mode auto-disables.
the pig adapts to the hardware it's given.)
CLIENT MONITOR (press [ENTER] on selected network):
- channel locks. the hunt begins.
- connected clients: MAC, vendor (OUI database),No open issues yet, or sync has not completed.