# nullpounce/pounce-keys architecture

> Architecture diagram of the GitHub repository nullpounce/pounce-keys, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nullpounce/pounce-keys
- Repository: https://github.com/nullpounce/pounce-keys

## Overview

##### Project Type & Purpose
- The project is an Android keylogger/backdoor tool with multiple delivery options (Discord, Gmail, IP) that also includes an injection mechanism. It isn’t a conventional full-stack application but a tool that comprises Android APK projects, multiple platform-specific variants, and a web-based log viewing panel.
- The README clearly states that its purpose is to capture keystrokes by leveraging an Android accessibility service and forward logs via various channels, as well as provide a builder/injector mechanism for embedding the malicious code into target APKs.

##### Analyzing the File Structure
- There are several high-level directories:
- “app”: Contains the primary Android source (Java files, manifest, Gradle build scripts, resources) – this is the main Android keylogger application.
- “Versions”: Contains variant source code files for different modes (Discord, Gmail, IP, plus separate AndroidManifest.xml files for stealth versus non-stealth versions). This indicates modularity to support different endpoints/behaviors.
- “web”: Holds HTML, JavaScript, and CSS files for a web panel. This panel is likely used to view the captured logs.
- Executables and Python scripts outside these folders (e.g., Discord_HTML.exe, Gmail.exe, IPhtmlUpdater.exe, PounceKeys.py) indicate builder/injector utilities used for customizing, packaging, or injecting the keylogger service into other APKs.
- “build-tools”, “gradle”, and configuration files (build.gradle, settings.gradle, etc.) denote the Android build environment.
- These directories clearly mark out components that include the Android keylogger, the variant payloads, the injection tools, and the web-based log panel.

a. Main Components:
- Android Keylogger Application: Shown as the “App” module, built with Android Studio/Gradle. It includes source code in “app” and different configurations in “Versions” (Discord, Gmail, IP, NonStealth, and Stealth).
- Injection/Builder Utility: Represent the Python-based injector (using “PounceKeys.py”, “injector”, and related executables) which lets the developer inject malicious code into target APKs by replacing placeholder webhook values.
- Web Panel Component: Include the “web” directory containing HTML, CSS, and JavaScript for displaying logs remotely.
- External Communication Channels: Represent external endpoints or channels (Discord servers, Gmail accounts, IP-based server endpoints) where logs are sent.
- Build Tools & Infrastructure: Show the Android build environment (Gradle, build-tools, etc.) that supports compiling and packaging the Android application.

b. Relationships & Interactions:
- The Android Keylogger acts as the central component running on the target device and capturing logs via an accessibility service.

c. Architectural Patterns & Design Principles:
- Injection & Customization: Emphasize the injection process as a key design feature. Note the “search and replace” operation to bind a developer’s specific webhook into the payload.
- Multiple Communication Paths: Clearly demarcate that the logging mechanism is not tied to a single channel—illustrate the three separate endpoints and how the keylogger can be configured to select among them.

d. Mention Relevant Technologies:
- Android/Java (source code in “app” and “Versions”).
- Gradle build system (build.gradle, settings.gradle).
- Python-based injection tool (PounceKeys.py, and associated executable scripts).
- Web technologies (HTML, CSS, JavaScript found in “web”).
- External communication is facilitated via webhooks or API calls for Discord, Gmail, and IP logs.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Android Client Section
    subgraph "Android Client"
        A1["Android Keylogger App (Accessibility Service)"] 
        A2["Variant Implementations"]
    end

    %% Injection/Builder Utility Section
    subgraph "Injection/Builder Utility"
        IU["Injection Utility"]
        I1["PounceKeys.py"]
        I2["PounceKeys.exe"]
        I3["Discord_HTML.py"]
        I4["Discord_HTML.exe"]
        I5["Gmail.py"]
        I6["Gmail.exe"]
        I7["IPhtmlUpdater.py"]
        I8["IPhtmlUpdater.exe"]
        IU --> I1
        IU --> I2
        IU --> I3
        IU --> I4
        IU --> I5
        IU --> I6
        IU --> I7
        IU --> I8
    end

    %% External Services & Web Panel Section
    subgraph "External Services & Log Viewer"
        E1["Discord Server"]
        E2["Gmail Server"]
        E3["IP Server"]
        WP["Web Panel (Log Viewer)"]
    end

    %% Build Tools & Infrastructure Section
    subgraph "Build Tools & Infrastructure"
        B1["Android Build Environment"]
    end

    %% Target APK Node (outside subgraphs)
    TA["Target APK"]

    %% Relationships
    B1 -->|"builds"| A1
    A1 -->|"sends_logs"| E1
    A1 -->|"sends_logs"| E2
    A1 -->|"sends_logs"| E3
    E3 -->|"displays_logs"| WP
    IU <-->|"injection_process"| TA

    %% Classes
    class A1,A2,B1,TA android
    class IU,I1,I2,I3,I4,I5,I6,I7,I8 injection
    class E1,E2,E3 external
    class WP web

    %% Click Events for Android Keylogger Application
    click A1 "https://github.com/nullpounce/pounce-keys/blob/main/app/src/main/java/com/MyAccessibilityService.java"
    click A2 "https://github.com/nullpounce/pounce-keys/tree/main/Versions/"

    %% Click Events for Injection/Builder Utility Components
    click I1 "https://github.com/nullpounce/pounce-keys/blob/main/PounceKeys.py"
    click I2 "https://github.com/nullpounce/pounce-keys/blob/main/PounceKeys.exe"
    click I3 "https://github.com/nullpounce/pounce-keys/blob/main/Discord_HTML.py"
    click I4 "https://github.com/nullpounce/pounce-keys/blob/main/Discord_HTML.exe"
    click I5 "https://github.com/nullpounce/pounce-keys/blob/main/Gmail.py"
    click I6 "https://github.com/nullpounce/pounce-keys/blob/main/Gmail.exe"
    click I7 "https://github.com/nullpounce/pounce-keys/blob/main/IPhtmlUpdater.py"
    click I8 "https://github.com/nullpounce/pounce-keys/blob/main/IPhtmlUpdater.exe"

    %% Click Event for Web Panel Component
    click WP "https://github.com/nullpounce/pounce-keys/blob/main/web/index.html"

    %% Click Event for Build Tools & Infrastructure
    click B1 "https://github.com/nullpounce/pounce-keys/blob/main/build.gradle"
```
