Sign inSign up

credkellar/tapbaitx

By credkellar

β€’Updated about 7 hours ago

TapBaitx: consent-first phone, location & media tracking lab in Python, Java, JS - Carbon 4 council!

Image
Networking
Security
Developer tools
1

52

credkellar/tapbaitx repository overview

β πŸ“±πŸ›°οΈ TapBaitx

TapBaitx cover

A consent-first phone, cell phone, video-call, location, and media tracking lab β€” built with synthetic fixtures only, in Python 🐍, Java β˜•, and JavaScript 🟨.

Python Java JavaScript Docker CI Docker Publish pytest Checks JS Checks Google Earth SHA-256 Gemini Carbon 4 Muse HOLD Gates

⚠️ Workflow badge note: the CI and Docker Publish badges above are static shields badges. The real workflow-status badges light up only after you paste the two workflow files into .github/workflows/ (plural) and they run once β€” until then GitHub has no run to show, and this README does not fake one.

πŸ”’ The one rule of this whole project: TapBaitx studies how phone tapping, call tracking, location tracking, and media tracking work β€” using fake phone lines, fake calls, and your own media only. It never taps a real line, never tracks another person, and never decrypts a real FaceTime call. Every live power is locked behind a HOLD gate.


β πŸ“– What is this about?

TapBaitx is a learning lab about the technology inside five everyday things:

  1. πŸ“ž Phone calls β€” how numbers are written, checked, and logged.
  2. πŸ“± Cell phones β€” how LTE, 5G, and a simulated 6G profile differ in speed and delay.
  3. 🎧 Wire taps β€” how a lawful, authorized tap is supposed to work: a case reference, a defined target, and a record of everything β€” recreated here on synthetic (fake) fixture lines only.
  4. πŸ“Ή FaceTime-style video calls β€” how video tiles, cameras, and packet timing work, without ever touching Apple's real encrypted traffic.
  5. 🌍 Location + media tracking β€” how Google Earth maps a track, and how a photo, GIF, or video carries a fingerprint and (sometimes) a location β€” only with the owner's consent, and fuzzed before it is ever shared.

On top of all that sits a 🧠 council: Gemini Carbon 4 Extended Thinking as the decider and Muse as the advisor. The council can make a rule stricter. It can never unlock a HOLD gate.


β πŸ› οΈ What this does?

  • ☎️ Formats and checks US phone numbers, and flags 555 numbers as synthetic (555 is the fake-number range used in movies and labs).
  • πŸ“‹ Builds a deterministic synthetic call log β€” same seed, same fake log, every time.
  • πŸ“Ά Compares LTE / 5G / 6G-sim cell profiles (peak speed + latency).
  • 🎧 Opens a simulated tap session only when both locks pass: the line is a synthetic fixture and an authorization reference is recorded. No reference = HOLD. Real line = HOLD.
  • πŸ—£οΈ Analyses a synthetic transcript: who spoke, how many turns, and the top words.
  • πŸ“Ή Lays out FaceTime-style video tiles (9 people = 3Γ—3 tiles) and follows the golden rule: a friend is seen only if they joined AND turned their own camera on.
  • πŸ” Summarises video-call packet metadata only (sizes and timing). Payloads are never inspected β€” real FaceTime traffic is encrypted, and this lab keeps it that way.
  • 🌍 Exports a real Google Earth KML file for a location track β€” only if sharing is ON, and coordinates are fuzzed first (public = city level, about 11 km).
  • πŸ“ Measures a track with real haversine distance math.
  • πŸ–ΌοΈ Tracks images: detects PNG/JPEG/WebP by their real magic bytes and fingerprints them with SHA-256.
  • 🎞️ Tracks GIFs: detects GIFs and counts their frames from the real byte stream.
  • 🎬 Tracks videos: detects MP4 files and models motion / scene changes from frame brightness data you supply.
  • 🧭 Reads a photo's EXIF location only if the owner consents, and only ever exports it city-fuzzed in public output.
  • 🧹 Produces a strip-metadata plan so an owner can remove GPS and device data from their own media before sharing it.
  • 🧠 Runs every big question past the Carbon 4 decider + Muse advisor council β€” offline, no live API calls, keys are names only.

β βš™οΈ How this works?

  1. You start at main.py β€” it runs the demo and all 24 self-checks.
  2. Phone work goes to phone.py β€” numbers are cleaned to 10 digits, formatted, and checked for the 555 synthetic flag.
  3. Tap work goes to taplab.py β€” it checks the two locks (synthetic line + authorization reference). If either fails, it raises a HOLD error and nothing happens.
  4. Video work goes to facetime_lab.py β€” tile math, join/camera visibility, and metadata-only packet summaries.
  5. Location work goes to geoearth.py β€” consent is checked first, coordinates are fuzzed second, and only then is a KML file built and XML-validated.
  6. Media work goes to media_tracker.py β€” format is detected from magic bytes, a SHA-256 fingerprint is taken, duplicates are caught by fingerprint, and location is attached only with owner consent.
  7. Big questions go to council.py β€” Carbon 4 maps, models, stress-tests, and decides; Muse advises. The decider's verdict stands. A HOLD verdict is final.
  8. Every lock lives in gates.py β€” 14 HOLD gates, listed in one place, readable by anyone.
  9. The same core ideas exist three times β€” 🐍 Python (full version), 🟨 JavaScript (Node, verified), and β˜• Java (same models, JDK stdlib only) β€” so you can compare how three languages solve the same problem.
β πŸ—ΊοΈ Master flowchart
flowchart TD
    A[▢️ main.py demo] --> B[πŸ“ž phone.py numbers + call log]
    A --> C[🎧 taplab.py two-lock tap check]
    C -->|either lock fails| H[β›” HOLD - nothing happens]
    A --> D[πŸ“Ή facetime_lab.py tiles + metadata]
    A --> E[🌍 geoearth.py consent β†’ fuzz β†’ KML]
    A --> F[πŸ–ΌοΈ media_tracker.py format + fingerprint]
    F --> G[🧭 owner consent?]
    G -->|no| N[location stays empty]
    G -->|yes| Y[city-fuzzed location]
    A --> I[🧠 council.py Carbon 4 decides + Muse advises]
    I --> J[βœ… verdict - HOLD always wins]

β πŸ’» Tech Stack Badges & Architecture

⁠🐍 Core Programming Languages & Core Systems

Python Java JavaScript Node.js

⁠🌐 Web3 & Infrastructure

None β€” honestly. TapBaitx has no blockchain, no wallet, and no network service. It is an offline lab.

⁠πŸ–₯️ Platform Support & Hardware Architecture

Linux Docker

⁠⚑ Low-Level Infrastructure & Performance

SHA-256 KML Haversine

β πŸ”§ DevOps & Build Tools

GitHub Actions pytest

⁠☁️ Cloud Providers

None required. Optional, names-only, never called by default: GEMINI_API_KEY (Carbon 4 seat), MODEL_API_KEY (Muse seat), GOOGLE_MAPS_API_KEY (live Earth/Maps seat β€” HOLD-gated).

β πŸ”„ Updated Workflows
WorkflowFileWhat it runs
βœ… CI.github/workflows/ci.ymlPython pytest + main.py checks, Node JS checks, Java compile + checks
🐳 Docker Publish.github/workflows/docker-publish.ymlBuilds and pushes credkellar/tapbaitx:latest using the DOCKERHUB_USERNAME + DOCKERHUB_TOKEN repo secrets

⁠😎 Why is this cool?

Because it teaches real phone, location, and media technology the safe way β€” with the locks visible, not hidden.

β πŸ”Ÿ 10 reasons why this is cool

  1. πŸ“ž You learn how phone numbers and call logs really work, on fake numbers that can never embarrass a real person.
  2. 🎧 The wire-tap chamber teaches the lawful shape of a tap β€” authorization first, target second, record everything β€” by making anything else impossible in the code.
  3. πŸ“Ή The FaceTime-style lab shows the kindest rule in video calling: nobody is seen until they turn their own camera on.
  4. 🌍 Location is off by default, and even when it is on, public output is city-fuzzed β€” you can share "Los Angeles" without sharing your house.
  5. πŸ–ΌοΈ The media tracker catches a copied photo or GIF instantly, because copies have the same SHA-256 fingerprint.
  6. 🎞️ GIF frame counting and video motion work on real bytes and real math, not pictures of results.
  7. 🧠 It has a two-brain council β€” Carbon 4 decides, Muse advises β€” and the advisor cannot overrule a safety HOLD.
  8. πŸβ˜•πŸŸ¨ The same ideas are written in Python, Java, and JavaScript, so it doubles as a language-learning project.
  9. πŸ§ͺ Everything is proven: pytest 6 passed, Python CHECKS 24/24, JS CHECKS 7/7 β€” run them yourself.
  10. πŸ”’ There is not one secret, password, or real person's data anywhere in the project. It is safe to share with anyone.

⁠🧩 What problems this solves?

#πŸ˜– Problemβœ… Solution
1Learning about taps can slide into spying on real peopleSolution 1: synthetic fixture lines only β€” a real line raises HOLD before anything runs
2"Authorized" tools often skip the paperworkSolution 2: no authorization reference = no session, enforced in code, not in a promise
3Location sharing leaks your exact home addressSolution 3: consent-first + city fuzzing before export β€” exact coordinates never enter a public file
4People get tracked without knowingSolution 4: sharing is OFF by default, the level is chosen by the owner, and tracking another person is a permanent HOLD gate
5A photo's hidden GPS data travels with it when sharedSolution 5: EXIF location is read only with owner consent, and a strip-metadata plan shows exactly what to remove
6The same image/GIF gets saved and shared as "new" copiesSolution 6: SHA-256 fingerprints dedupe media β€” copies are caught by hash, not by eye
7Nobody knows how many frames a GIF has or when a video changes sceneSolution 7: real GIF frame counting from the byte stream + a video motion/scene-change model
8Video-call tools can show people who never agreed to be seenSolution 8: visible = joined AND camera on β€” both, always
9Encrypted call traffic tempts people to "just peek" at payloadsSolution 9: metadata-only summaries β€” sizes and timing, payloads never inspected
10AI helpers sometimes talk people into unsafe actionsSolution 10: tighten-only council β€” Carbon 4 can raise a HOLD, Muse can only advise, neither can lift a gate

⁠πŸ“₯ How to install this? Step-by-step

  1. Get the code
    git clone https://github.com/credkellar/TapBaitx.git
    cd TapBaitx
    
  2. Run the Python version (nothing to install β€” standard library only)
    python3 main.py
    
    You should see CHECKS 24/24.
  3. Run the Python tests
    pip install pytest
    python3 -m pytest -q
    
    You should see 6 passed.
  4. Run the JavaScript version
    node js/tapbaitx.js
    
    You should see JS CHECKS 7/7.
  5. Run the Java version (needs a JDK, see Requirements)
    cd java
    javac TapBaitx.java
    java TapBaitx
    
    You should see JAVA CHECKS 6/6.
  6. (Optional) Run it in Docker
    docker build -t tapbaitx .
    docker run tapbaitx
    
  7. (Optional, GitHub) Paste the two workflow files into .github/workflows/ (plural) and add the Docker Hub secrets (DOCKERHUB_USERNAME, DOCKERHUB_TOKEN) in repo Settings β†’ Secrets β†’ Actions. The first push then runs CI, and Docker Publish pushes credkellar/tapbaitx:latest.

β πŸ“‹ Requirements?

ThingNeeded forNotes
🐍 Python 3.12+Main project + testsStandard library only; pytest is the one test install
🟨 Node.js 24+JavaScript portZero npm packages
β˜• JDK 17+Java portJDK standard library only. ⚠️ The project was built on a machine with no JDK installed, so the Java file is source-delivered and its checks run in CI (or on your machine) β€” the Python and JavaScript versions are the ones verified live at build time
🐳 DockerOptional container runBuilds from python:3.12-slim
πŸ”‘ API keysNot requiredAll seats run offline. Keys, if you ever add them, are environment-variable names only β€” never paste a key value into this repo

β πŸ§’ Explain in 5th grade English

Imagine you have a toy phone that only calls pretend numbers. πŸ“ž

TapBaitx is a practice kit for how real phones, video calls, maps, and pictures work β€” but everything in the kit is pretend or yours.

  • The "wire tap" is like listening to a play you wrote, with puppets. You need a hall pass (the authorization) even for the puppets. Listening to a real person's call is never allowed β€” the kit locks that door and throws away the key. πŸ”’
  • The map only shows where you say it can, and it draws your dot big and fuzzy β€” like a whole city β€” so nobody can find your house. 🌍
  • Every picture gets a fingerprint. If someone copies your picture, the fingerprint matches, and the kit says "hey, that's a copy!" πŸ–ΌοΈ
  • On video calls, nobody can see you until you press the camera button yourself. πŸ“Ή
  • Two robot brains help decide if something is safe. One decides, one gives advice. If either one says "stop," the answer is stop. 🧠

That's it: learn how the real thing works, practice on pretend things, and keep every real person safe.


β πŸ“œ Script-by-script β€” with a mermaid flowchart for each script

⁠▢️ main.py β€” demo + 24 CHECKS
flowchart TD
    A[Start] --> B[Run demo data]
    B --> C[Run 24 checks across every module]
    C --> D{All pass?}
    D -->|yes| E[Print CHECKS 24/24 - exit 0]
    D -->|no| F[Print FAIL lines - exit 1]
β πŸ”’ tapbaitx/gates.py β€” the 14 HOLD gates
flowchart TD
    A[Any live or non-consensual action] --> B{Named in gates.py?}
    B -->|yes| C[β›” HOLD - action never runs]
    B -->|no| D[Continue - still checked by its module]
β πŸ“ž tapbaitx/phone.py β€” numbers, cell profiles, call log
flowchart TD
    A[Raw number] --> B[Strip to digits]
    B --> C{10 digits?}
    C -->|no| D[ValueError]
    C -->|yes| E[Format 202 555-0147 style]
    E --> F{Exchange = 555?}
    F -->|yes| G[Flag: synthetic βœ…]
    F -->|no| H[Flag: not synthetic]
⁠🎧 tapbaitx/taplab.py β€” the simulated tap chamber
flowchart TD
    A[Open tap request] --> B{Line synthetic?}
    B -->|no| H[β›” HOLD]
    B -->|yes| C{Authorization ref given?}
    C -->|no| H
    C -->|yes| D[Session opens - transcript analysis only]
    D --> E[Count turns, speakers, top words]
β πŸ“Ή tapbaitx/facetime_lab.py β€” FaceTime-style video lab
flowchart TD
    A[Participant] --> B{Joined?}
    B -->|no| V[Not visible]
    B -->|yes| C{Camera on?}
    C -->|no| V
    C -->|yes| D[βœ… Visible tile]
    A --> E[Packets] --> F[Metadata summary - payload never read]
flowchart TD
    A[Track points] --> B{Sharing ON?}
    B -->|no| N[Return None - no KML]
    B -->|yes| C[Fuzz coordinates to chosen level]
    C --> D[Build KML placemarks]
    D --> E[Validate XML] --> F[Return KML]
β πŸ–ΌοΈ tapbaitx/media_tracker.py β€” image / GIF / video tracker
flowchart TD
    A[Media bytes] --> B[Detect format by magic bytes]
    B --> C[SHA-256 fingerprint]
    C --> D[GIF? Count frames / Video? Motion model]
    D --> E{EXIF GPS + owner consent?}
    E -->|no| L[Location = empty]
    E -->|yes| M[City-fuzzed location in public record]
    C --> N{Same fingerprint seen?}
    N -->|yes| O[Mark duplicate]
⁠🧠 tapbaitx/council.py β€” Carbon 4 + Muse council
flowchart TD
    A[Question] --> B[Carbon 4: MAP β†’ MODEL β†’ STRESS β†’ DECIDE]
    A --> C[Muse: 4 advice items, authority none]
    B --> D{Verdict}
    C --> D
    D -->|HOLD anywhere| H[β›” Final = HOLD]
    D -->|clear| P[Proceed - with gates still on]
⁠🟨 js/tapbaitx.js β€” JavaScript port
flowchart TD
    A[node js/tapbaitx.js] --> B[format / synthetic / fuzz / haversine]
    B --> C[detect format + fingerprint]
    C --> D[tile layout] --> E[Print JS CHECKS 7/7]
β β˜• java/TapBaitx.java β€” Java port
flowchart TD
    A[javac + java TapBaitx] --> B[format / synthetic / fuzz / haversine]
    B --> C[detect format + SHA-256 fingerprint]
    C --> D[tile layout] --> E[Print JAVA CHECKS 6/6]

⁠⛔ The 14 HOLD gates

GateWhat it locks
live_wiretap_real_lineTapping a real phone line
covert_interceptionSpying on another person, in secret, ever
facetime_interception_decryptionDecrypting or tapping real FaceTime traffic
tracking_another_personTracking another person's location
carrier_network_accessCarrier / SS7 / Diameter network access
imsi_catcherIMSI catcher / stingray operation
call_recording_without_consentRecording a real call without consent notice
live_location_api_callLive Earth/Maps calls without key + consent
live_gemini_api_callLive Carbon 4 calls (seat runs offline)
live_muse_api_callLive Muse calls (seat runs offline)
media_upload_externalUploading tracked media to an outside service
exact_location_public_shareExact coordinates in public output
child_location_sharingSharing a child's location
exif_location_of_others_mediaReading location from another person's media without consent

⁠🌳 Project structure

TapBaitx/
β”œβ”€β”€ πŸ“„ README.md
β”œβ”€β”€ ▢️ main.py
β”œβ”€β”€ 🐳 Dockerfile
β”œβ”€β”€ πŸ“¦ tapbaitx/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ πŸ”’ gates.py
β”‚   β”œβ”€β”€ πŸ“ž phone.py
β”‚   β”œβ”€β”€ 🎧 taplab.py
β”‚   β”œβ”€β”€ πŸ“Ή facetime_lab.py
β”‚   β”œβ”€β”€ 🌍 geoearth.py
β”‚   β”œβ”€β”€ πŸ–ΌοΈ media_tracker.py
β”‚   └── 🧠 council.py
β”œβ”€β”€ 🟨 js/
β”‚   └── tapbaitx.js
β”œβ”€β”€ β˜• java/
β”‚   └── TapBaitx.java
β”œβ”€β”€ πŸ§ͺ tests/
β”‚   └── test_all.py
└── πŸ”„ .github/workflows/
    β”œβ”€β”€ ci.yml
    └── docker-publish.yml

β βœ… Verification (run at build time, re-runnable any time)

python3 main.py        β†’ CHECKS 24/24
python3 -m pytest -q   β†’ 6 passed        (clean copy, fresh venv)
node js/tapbaitx.js    β†’ JS CHECKS 7/7
java/TapBaitx.java     β†’ source-delivered (no JDK on the build machine; CI compiles + runs it)

β βš–οΈ Honest scope

  • βœ… Real: number formatting/validation, synthetic-log determinism, haversine math, coordinate fuzzing, KML generation + XML validation, magic-byte format detection, SHA-256 fingerprints, GIF frame counting, tile-layout math, the two-lock tap gate, the consent gates.
  • 🎭 Modelled / simulated: the tap chamber (synthetic transcripts, no audio), FaceTime-style rooms (no call is ever connected), cell profiles (published-style figures, not measurements), video motion (from brightness data you supply).
  • β›” Never in this project: a real tap, a real track of another person, real FaceTime decryption, carrier access, or a live API call. Those doors are HOLD gates, and the council cannot open them.

Tag summary

Content type

Image

Digest

sha256:7499614d1…

Size

45.6 MB

Last updated

about 7 hours ago

docker pull credkellar/tapbaitx