# xdeadhackerx/the_cracker architecture

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

- Interactive diagram: https://gitdiagram.com/xdeadhackerx/the_cracker
- Repository: https://github.com/xdeadhackerx/the_cracker

## Overview

##### Project Type and Purpose
- This is a command-line security assessment tool (bash script) called “The_Cracker.”
- Its purpose is to automate brute-force and dictionary attacks against various targets: encrypted files (Office, PDF, ZIP, RAR), network protocols (FTP, SSH, Telnet, SMB, RDP), captured Wi-Fi handshakes and generic hashes, local IP logins, plus dictionary generation and hash utilities.

##### File Structure Analysis
- Top‐level files:
- LICENSE, README.md
- the_cracker.sh – the single entry-point shell script providing a menu-driven CLI
- requisitos/0.sh – requisitos/1.sh … requisitos/5.sh – installer & dependency checker scripts
- The directory requisitos likely also contains subdirectories for results (e.g., requisitos/resultados/dicc.txt) as noted in the README.
- No separate “src” or “lib” folders; all functionality is orchestrated by the_cracker.sh, calling out to dependencies and installer scripts.

##### Key Components
a. User Interface Layer
- the_cracker.sh – main menu, user input, control flow
b. Installer & Dependency Manager
- requisitos/0.sh … requisitos/5.sh – check/install required external tools (hashcat, john, hydra, nmap, zip2john, rar2john, pdfcrack, fcrackzip, hash-identifier, etc.)
c. Functional Modules
- File Decryption Module – brute-force & dictionary attacks on Office/PDF/ZIP/RAR
- Network Protocol Attack Module – dictionary attacks via Hydra/ncrack against FTP/SSH/Telnet/SMB/RDP; includes optional nmap scan
- Handshake/Hash Cracking Module – uses hashcat/john to crack Wi-Fi handshakes and generic hashes
- Local Login Module – network scan + dictionary attack on a specific IP:port
- Dictionary Creation Module – user-driven wordlist builder (names, dates, pets, custom patterns)
- Utilities Module – hash extraction from .cap, hash-type identification, hash generation
d. External Tools & Services
- Hydra, ncrack, nmap, hashcat, John the Ripper, pdfcrack, fcrackzip, zip2john, rar2john, hash-identifier

##### Relationships and Data Flow
- User → the_cracker.sh (CLI commands)
- the_cracker.sh → requisitos/*.sh (dependency installation/verification)
- the_cracker.sh → Functional Modules
- Each Functional Module → External Tools (e.g., File Decryption Module → fcrackzip/pdfcrack/zip2john)
- Network Modules → Network (target IP:port)
- Handshake Module → File System (input .cap → output hash)
- Dictionary Creation Module → File System (output wordlist)
- Utilities Module ↔ File System (read/write hashes, identify types)

##### Architectural Patterns and Principles
- Single Orchestrator Pattern: one script controls all workflows
- Modular Design: discrete modules for each attack vector and utility
- Externalization of Dependencies: uses separate installer scripts (requisitos) to decouple tool installation from core logic
- CLI-Driven Workflow: linear, menu-based control flow

##### Elements
- Notes on protocol/attack type next to network-facing modules

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Core Scripts
    subgraph "Core Scripts"
        direction TB
        CLI["the_cracker.sh"]:::core
        subgraph "Installer & Dependency Manager"
            direction TB
            Install0["requisitos/0.sh"]:::core
            Install1["requisitos/1.sh"]:::core
            Install2["requisitos/2.sh"]:::core
            Install3["requisitos/3.sh"]:::core
            Install4["requisitos/4.sh"]:::core
            Install5["requisitos/5.sh"]:::core
        end
    end

    %% Attack Modules
    subgraph "Attack Modules"
        direction TB
        FileDec["File Decryption Module"]:::attack
        NetProt["Network Protocol Attack Module"]:::attack
        Handshake["Handshake/Hash Cracking Module"]:::attack
        LocalLogin["Local Login Module"]:::attack
    end

    %% Utilities & Dictionary
    subgraph "Utilities & Dictionary Generation"
        direction TB
        DictGen["Dictionary Creation Module"]:::util
        Utils["Utilities Module"]:::util
    end

    %% External Tools
    subgraph "External Tools"
        direction TB
        Hydra["Hydra"]:::external
        Ncrack["ncrack"]:::external
        Nmap["nmap"]:::external
        Hashcat["hashcat"]:::external
        John["John the Ripper"]:::external
        PDFCrack["pdfcrack"]:::external
        Fcrackzip["fcrackzip"]:::external
        Zip2John["zip2john"]:::external
        Rar2John["rar2john"]:::external
        HashId["hash-identifier"]:::external
    end

    %% File System / Storage
    FS["File System / Results"]:::storage

    %% User
    User["User"]:::external

    %% Control Flow
    User -->|"CLI commands"| CLI
    CLI -->|"init/install"| Install0
    CLI --> Install1
    CLI --> Install2
    CLI --> Install3
    CLI --> Install4
    CLI --> Install5
    CLI -->|"select attack"| FileDec
    CLI --> NetProt
    CLI --> Handshake
    CLI --> LocalLogin
    CLI --> DictGen
    CLI --> Utils

    %% Modules to Tools
    FileDec -->|"fcrackzip/pdfcrack/zip2john/rar2john"| Fcrackzip
    FileDec --> PDFCrack
    FileDec --> Zip2John
    FileDec --> Rar2John

    NetProt -->|"Hydra (FTP/SSH/Telnet/SMB/RDP)"| Hydra
    NetProt -->|"ncrack (optional)"| Ncrack
    NetProt --> Nmap

    Handshake -->|"hashcat –m 2500/john"| Hashcat
    Handshake --> John

    LocalLogin -->|"Hydra/John"| Hydra
    LocalLogin --> John

    DictGen --> FS
    Utils --> FS
    Handshake --> FS

    %% Styles
    classDef core fill:#cce5ff,stroke:#004085,color:#004085;
    classDef attack fill:#d4edda,stroke:#155724,color:#155724;
    classDef util fill:#fff3cd,stroke:#856404,color:#856404;
    classDef external fill:#e2e3f5,stroke:#383d78,color:#383d78;
    classDef storage fill:#f8f9fa,stroke:#6c757d,color:#6c757d;

    %% Click Events
    click CLI "https://github.com/xdeadhackerx/the_cracker/blob/main/the_cracker.sh"
    click Install0 "https://github.com/xdeadhackerx/the_cracker/blob/main/requisitos/0.sh"
    click Install1 "https://github.com/xdeadhackerx/the_cracker/blob/main/requisitos/1.sh"
    click Install2 "https://github.com/xdeadhackerx/the_cracker/blob/main/requisitos/2.sh"
    click Install3 "https://github.com/xdeadhackerx/the_cracker/blob/main/requisitos/3.sh"
    click Install4 "https://github.com/xdeadhackerx/the_cracker/blob/main/requisitos/4.sh"
    click Install5 "https://github.com/xdeadhackerx/the_cracker/blob/main/requisitos/5.sh"
```
