# zidansec/cloudpeler architecture

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

- Interactive diagram: https://gitdiagram.com/zidansec/cloudpeler
- Repository: https://github.com/zidansec/cloudpeler

## Overview

##### Project type and purpose
- This is a standalone CLI information-gathering tool written in PHP, called CrimeFlare. Its sole purpose is to discover the real IP address of a domain protected by CloudFlare, along with related metadata (DNS records, geo info, organization, etc.).

##### File structure
- Top level:
- .github/ (issue & funding templates)
- LICENSE, README.md
- crimeflare.php (the only implementation file)
- There are no “frontend” or “backend” folders—just one script. No databases, no microservices, no build pipelines.

##### README for additional insights
- The README describes:
- Dependencies (php-curl)
- Two external APIs used:
– https://crimeflare.zidansec.com (custom lookup API)
– http://ipinfo.io/<ip>/json (geo/IP info)
- DNS lookups for NS records and CloudFlare IPs
- How to install and invoke the CLI tool on Linux.

##### Key advice
- Be exhaustive: even though it’s a single-script tool, capture the runtime environment, all external dependencies, and the data-flow sequence.
- Keep labels concise but specific (e.g., “DNS NS query,” “API: /lookup?domain=”).

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% User Interaction
    User["User Terminal"]:::user
    Output["Console Output"]:::user

    %% Host Environment
    subgraph "Host Environment"
        direction TB
        OS["OS & PHP Runtime"]:::internal
        Script["crimeflare.php"]:::internal
    end

    %% External Services
    subgraph "External Services"
        direction TB
        DNS["DNS Resolver"]:::external
        CF["CloudFlare WAF (target)"]:::external
        CustomAPI["CrimeFlare API\n(crimeflare.zidansec.com)"]:::external
        IPService["ipinfo.io API"]:::external
    end

    %% Interactions
    User -->|"cli: crimeflare example.com"| Script
    Script -->|"DNS NS query"| DNS
    DNS -->|"resolves CF IPs"| CF
    Script -->|"HTTP GET /lookup?domain="| CustomAPI
    Script -->|"HTTP GET /<candidate-IP>/json"| IPService
    Script -->|"aggregates data"| Output

    %% Click Events
    click Script "https://github.com/zidansec/cloudpeler/blob/master//crimeflare.php"
    click README "https://github.com/zidansec/cloudpeler/blob/master//README.md"
    click LICENSE "https://github.com/zidansec/cloudpeler/tree/master//LICENSE"

    %% Styles
    classDef internal fill:#c8e6c9,stroke:#2e7d32,color:#2e7d32
    classDef external fill:#bbdefb,stroke:#1976d2,color:#0d47a1
    classDef user fill:#eeeeee,stroke:#757575,color:#212121
```
