> For the complete documentation index, see [llms.txt](https://jieyab89-osint.gitbook.io/jieyab89-osint-cheat-sheet-wiki-tips/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jieyab89-osint.gitbook.io/jieyab89-osint-cheat-sheet-wiki-tips/scripting-for-osint/basic-programming-language.md).

# Basic Programming Language

## What its programming?&#x20;

Programming is the process of designing, writing, testing, and maintaining a series of instructions (code) that command a computer to perform specific tasks, such as creating applications, websites, or automating work. It is a form of communication between humans and machines using programming languages (such as Python, Java, JavaScript).

Here are the details about programming:

Purpose: To give commands to a computer to solve problems, process data, or perform specific functions.

## Programming language&#x20;

A programming language is a set of instructions, syntactic rules, and formal notation used by humans to communicate with computers and instruct them to perform specific tasks. It is the foundation of software, application, and website development, which converts human logic into machine-readable code.

Main Functions of Programming Languages

1. Automating Tasks: Performing repetitive tasks automatically and with precision.
2. Application/Website Development: Creating various software, ranging from mobile applications and games to operating systems.
3. Problem Solving: Processing data and finding solutions to complex problems.
4. Bridging Communication: Acting as an intermediary between human logic and computer hardware.

Examples of Popular Programming Languages

1. Python: Popular for beginners, data science, and AI.
2. JavaScript: The standard for creating interactive web pages.
3. Java: Widely used for enterprise applications and Android.
4. C++: Used for systems that require high performance.
5. PHP: Commonly used for server-side web development.

Programming Languages & Their Levels

| Level      | Role                                                     | Example Lang |
| ---------- | -------------------------------------------------------- | ------------ |
| Low Level  | Machine like operating system, IoT and embedding program | Assembly     |
| Mid-level  | Design system, microservice and logic                    | C, C++ c#    |
| High Level | Easier for humans to read                                | PHP, Python  |

**Interpreter vs Compiler**&#x20;

**Interpreter**

Code is executed line by line at runtime. Advantages:

1. Fast for testing
2. No build process required Disadvantages:
3. Slower than compiled languages

Example PHP via terminal:

```bash
php file.php
```

**Compiler**&#x20;

The code is first converted into a binary file. Stages:

1. Preprocessing
2. Compilation
3. Linking
4. An executable is created

Compile example:

```bash
gcc program.c -o program

run

./program
```

**Please take a note:**&#x20;

Some compilers have differences, for example, clang, gcc, mingw, and Microsoft Visual C++ compilers. In my experience using several compilers, there were errors due to differences in the environment, standardization, syntax during the compilation process, and compiler versions. For more details, read the documentation.

**Interpreter vs Compiler (In a Nutshell)**

| **Interpreter**                              | **Compiler**                                                 |
| -------------------------------------------- | ------------------------------------------------------------ |
| Executes code **line by line** directly      | Translates the **entire code** first into an executable file |
| During program execution (runtime)           | During the compilation process before execution              |
| Slower                                       | Faster                                                       |
| Does not produce a `.exe` or executable file | Produces an `.exe` file or binary executable                 |

## What is code editor

A code editor is software designed to write, edit, and manage program code more efficiently than a regular text editor, offering important features such as syntax highlighting, auto-completion, and error checking to help developers increase productivity and minimize errors. It is a must-have tool for programmers working with various languages such as Python, JavaScript, PHP, and others, and can be a versatile tool or one designed for specific purposes, such as VS Code, Sublime Text, or Atom.

## IDE code editor what mean?

IDE (Integrated Development Environment) A complete environment that combines an editor, debugger, compiler, and other tools in a single interface for the full development cycle. Examples: Eclipse, IntelliJ IDEA, Code Blocks.

## What are the aspects of programming languages?

1. Algorithm and Structure Data&#x20;

Data structures are ways of organizing and storing data in computers so that it can be used efficiently. Each structure has advantages and disadvantages, depending on the needs of the application being developed.

For example, arrays (especially static arrays) are suitable for storing a fixed amount of data and can be accessed directly using an index. Some programming languages also provide dynamic array implementations that can change in size.

Example in C&#x20;

```c
#include <stdio.h>

int main() {
    int data[] = {10, 50, 30, 70, 90};
    int cari = 30;
    int n = 5;
    int ditemukan = -1;

    for (int i = 0; i < n; i++) {
        if (data[i] == cari) {
            ditemukan = i; 
            break;
        }
    }

    if (ditemukan != -1) {
        printf("Found! %d Array indeks: %d\n", cari, ditemukan);
    } else {
        printf("Not Found.\n");
    }

    return 0;
}
```

Output&#x20;

<figure><img src="/files/MyKuWnX0J4XsfOMmfO6k" alt=""><figcaption></figcaption></figure>

2. Variable&#x20;

Variables in programming are symbolic names or containers for storing data values in computer memory, the contents of which can be changed or manipulated while the program is running. They serve to store data such as numbers, text, etc.

Example in C&#x20;

```c
#include <stdio.h>

int main() {
    // Declare and initialize variables and type data 
    int studentID = 15;
    float studentFee = 75.25;
    char studentGrade = 'B';
    char studentName[] = "Alex";

    // Print the values of the variables using format specifiers
    printf("Student Name: %s\n", studentName);  // %s for string
    printf("Student ID: %d\n", studentID);    // %d for integer
    printf("Student Fee: %f\n", studentFee);  // %f for float
    printf("Student Grade: %c\n", studentGrade); // %c for char

    return 0;
}

```

Output&#x20;

<figure><img src="/files/yGU5T6uwEMYPflv5Wti3" alt=""><figcaption></figcaption></figure>

3. Class and Function&#x20;

A class is defined with the [`class`](https://www.w3schools.com/php/keyword_class.asp) keyword, followed by the name of the class and a pair of curly braces ({}). All its properties and methods go inside the braces.

Assume we create a **class** named Fruit. The Fruit class can have properties like name and color. In addition, the Fruit class has two methods for setting and getting the details:

Example PHP&#x20;

```php
<!DOCTYPE html>
<html>
<body>

<?php
class Fruit {
  public $name;
  public $color;

  function set_details($name, $color) {
    $this->name = $name;
    $this->color = $color;
  }
  function get_details() {
    echo "Name: " . $this->name . ". Color: " . $this->color .".<br>";
  }
}

// Create an object named $apple from the Fruit class
$apple = new Fruit();
$apple->set_details('Apple', 'Red');
$apple->get_details();

// Create an object named $banana from the Fruit class
$banana = new Fruit();
$banana->set_details('Banana', 'Yellow');
$banana->get_details();
?>
 
</body>
</html>
```

Output&#x20;

<figure><img src="/files/kNdvQfCILEdXIoFHf1Cm" alt=""><figcaption></figcaption></figure>

Example 2&#x20;

```php
<?php
// Call function built in php 
// https://www.php.net/manual/en/function.phpinfo.php
phpinfo();

?> 
```

and anymore, there is progarmming advance like OOP, DevOps Architecture & Infrastructure&#x20;

## Requirements for a language to be called a programming language

**Minimum requirements do have progamming language:**

1\. Variables

Can store values in memory.

Example (PHP):

```php
$age = 20;
```

2\. Operations/Calculations

Can process data.

```php
$total = $price * quantity;
```

3\. Branching (Decision Making)

Can make decisions

```php
if ($age >= 18) { ... }
```

4\. Loops

Can repeat instructions

```php
for ($i=0; $i<5; $i++) { ... }
```

5\. Program Flow Control

Can control the execution flow (functions, calls, returns, etc.)

6\. Turing Complete (Theoretical Concept)

Theoretically, the language can solve all computations if given sufficient time and memory.

Languages such as C, PHP, and Python meet all of the above requirements.

This is why are HTML, CSS, Markdown, and JSON NOT programming languages, because:&#x20;

HTML only tells the browser:

```
“This is a title”
“This is a paragraph”
“This is an image”
```

Example:

```
<h1>Hello</h1>
```

HTML cannot:

1. Perform calculations
2. Repeat processes
3. Make logical decisions

Because they have no control over execution logic.&#x20;

**Conclusion**

Programming language = manages logic and processes

HTML/CSS/MD/JSON = manages display or data structure

## Tips learn programming language&#x20;

1. Read the documentation&#x20;
2. Read and practice with study case&#x20;

Playground and platform for learn programming&#x20;

{% embed url="<https://www.w3schools.com/>" %}

## Intermezo just share&#x20;

Many people ask me about programming functions in the world of OSINT and the use of APIs. One case that I found particularly interesting involved someone who contacted me to say that they had been scammed into buying an OSINT tool for doxing on a Telegram channel. They gave me the source code, and what happened? Well, the entire code was completely nonsensical and didn't function as intended. In fact, the code was dangerous because it locked files and deleted files. I suspect it was created by AI because it contained emojis and vocabulary that resembled AI (vibe code)

<figure><img src="/files/1VObFSNRqnxmCSVyXCrc" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/eP9Is0diYUFuVGkddLL1" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/cUrT1iU3W9dsJgYYiPFC" alt=""><figcaption></figcaption></figure>

The gist of the conversation above is that someone bought an OSINT tool for tracking but got scammed and the code didn't work. There were other scripts like WhatsApp spam and viruses, but after I checked, it looked like it was made by AI, and the victim didn't know anything about programming and ran the program, losing their data and locking some files. Therefore, this serves as an important lesson: do not trust transactions on Telegram or those with poor reputations. If there is code involved, check first whether the script is harmful? Is it obfuscated? And so on. If you are curious, install it on a Virtual Machine or sandbox, either locally or via the cloud such as a VPS (virtual private server).

### Intermezo just share&#x20;

#### Vibe code is effective?&#x20;

Vibe coding, powered by AI, is a new approach to software development that emphasizes speed, creativity, and efficiency. With AI, the coding process can be done faster because it can help generate program structures, fix errors, generate ideas, and even explain code functions automatically. The main advantages of vibe coding are that it speeds up workflows, helps beginners learn more easily, and increases developer productivity in building projects without having to write everything from scratch

However, vibe coding also has several drawbacks. Cost-wise, using high-quality AI often requires a paid subscription, which is expensive, especially for intensive use. Furthermore, the code output from AI is not always optimal, safe, or meets requirements, requiring manual checking. Skill-wise, over-reliance on AI can diminish users' logical thinking and problem-solving abilities. Users who don't understand basic coding also risk simply copying AI results without understanding how the program works, making debugging or further development difficult

To ensure effective vibe coding, users should understand programming fundamentals such as coding logic, algorithms, simple data structures, and how programs generally work. Understanding basic coding helps users distinguish correct, efficient, and safe code. Furthermore, it's important to understand how to provide clear prompts to AI to ensure more accurate and tailored results. Users are also advised to create a blueprint or project plan before asking AI to write code, such as defining the folder structure, system flow, key features, database, and program objectives. With a clear blueprint, AI can understand the development direction and produce more structured, consistent, and easily extendable code. AI should be used as a tool to increase productivity, not as a substitute for thinking and learning skills in the coding process

Yeah, I started getting into vibe coding earlier this year, more precisely around the end of 2025 before the New Year. I tried vibe coding with tools like Google Anti Gravity, Claude, and GPT, and honestly, all of them were amazing and satisfying to use. However, one important thing needs to be emphasized: vibe coding does not guarantee that your software will work perfectly just by relying on prompting alone. I still highly recommend learning the basics so you actually understand coding, because AI should only be treated as a supporting tool

If you do not understand the fundamentals, it can easily turn into AI slop. Your project may end up messy, full of bugs, and have a generic, mainstream design that lacks originality. This becomes even more important when you want to build uncommon or complex projects, because those require deeper knowledge and clear direction for the AI. For example, if you want to build an accounting system but do not understand accounting concepts or formulas, the AI will likely generate poor results that do not match your actual needs or context. That is why understanding the context and having basic knowledge are essential for effective vibe coding

## Why is programming important?

From my experience during college and working in web development, IT security, OSINT, and research, coding or programming is important because it allows you to solve problems, automate tasks, process data, and more&#x20;

### OSINT with programming language&#x20;

From my experience in the field of OSINT, it is necessary to perform automation, text intelligence, formatting, and massive data collection, which is then stored in a database and turned into an intelligence information system. An example of this is collecting information about usernames and post content on social media. This can be accomplished through programming to simplify your OSINT&#x20;

**Example code for scrapping Jieyab OSINT resouces and wiki**&#x20;

```python
import requests
import json
import os
from bs4 import BeautifulSoup

# Arr URLs
urls = {
    "readme": "https://raw.githubusercontent.com/Jieyab89/OSINT-Cheat-sheet/refs/heads/main/README.md",
    "wiki": "https://github.com/Jieyab89/OSINT-Cheat-sheet/wiki",
    "articles": "https://raw.githubusercontent.com/Jieyab89/OSINT-Cheat-sheet/main/awesome-article.md"
}

json_file = os.path.join(os.pardir, "osint_data.json")

if os.path.exists(json_file):
    with open(json_file, "r", encoding="utf-8") as f:
        try:
            existing_data = json.load(f)
        except json.JSONDecodeError:
            existing_data = []
else:
    existing_data = []

existing_categories = {cat["category"]: cat for cat in existing_data}
new_categories = {}
current_category = None

def parse_markdown_md(url):
    response = requests.get(url)
    if response.status_code != 200:
        print(f"[-] Failed to fetch: {url}")
        return {}

    parsed = {}
    current_cat = None

    for line in response.text.split("\n"):
        line = line.strip()

        if line.startswith("# "):
            current_cat = line[2:].strip()
            parsed[current_cat] = {"category": current_cat, "items": []}

        elif line.startswith("- [") and "](" in line:
            parts = line.split("[", 1)[1].split("](")
            name = parts[0].strip()
            link = parts[1].split(")")[0].strip()
            if current_cat:
                parsed[current_cat]["items"].append({"name": name, "url": link})

    return parsed

def parse_github_wiki(url):
    wiki_items = []
    response = requests.get(url)
    if response.status_code != 200:
        print(f"[-] Failed to fetch: {url}")
        return {}

    soup = BeautifulSoup(response.text, "html.parser")
    for link in soup.select(".wiki-pages-box a"):
        title = link.text.strip()
        page_url = "https://github.com" + link["href"]
        wiki_items.append({"name": title, "url": page_url})

    if wiki_items:
        return {"Jieyab89 Wiki Pages": {"category": "Jieyab89 Wiki Pages", "items": wiki_items}}
    return {}

new_categories.update(parse_markdown_md(urls["readme"]))
new_categories.update(parse_markdown_md(urls["articles"]))
new_categories.update(parse_github_wiki(urls["wiki"]))

for category, new_data in new_categories.items():
    if category in existing_categories:
        existing_items = {item["name"] for item in existing_categories[category]["items"]}
        for new_item in new_data["items"]:
            if new_item["name"] not in existing_items:
                existing_categories[category]["items"].append(new_item)
    else:
        existing_categories[category] = new_data

with open(json_file, "w", encoding="utf-8") as f:
    json.dump(list(existing_categories.values()), f, indent=4, ensure_ascii=False)

print(f"[+] Data updated: {json_file}")

```

Result&#x20;

```json
 {
        "category": "See Jieyab Gitbook",
        "items": [
            {
                "name": "Intelligence Base & Knowledge Base",
                "url": "https://jieyab89-osint.gitbook.io/jieyab89-osint-cheat-sheet-wiki-tips/intelligence-base/intelligence-base-and-knowledge-base"
            },
            {
                "name": "All About Doxing",
                "url": "https://jieyab89-osint.gitbook.io/jieyab89-osint-cheat-sheet-wiki-tips/intelligence-base/all-about-doxing"
            },
            ..............................
        ]
    },
```

Parsing data with node gaph (visualization)

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Jieyab89 OSINT cheat sheet, list OSINT tools, wiki, dataset, article, book , red team OSINT for hackers and OSINT tips and OSINT branch. This repository will grow every time will research, there is a research, science and technology, tutorial. Please use it wisely.">
    <meta name="keywords" content="OSINT, SOCMINT, SIGINT, cheat sheet, MASINT, jieyab89">
    <meta name="author" content="Jieyab89">
    <meta name="robots" content="index, follow">
    <meta name="revisit-after" content="7 days">

    <meta property="og:title" content="Jieyab89 OSINT Cheat Sheet">
    <meta property="og:description" content="Jieyab89 OSINT cheat sheet, list OSINT tools, wiki, dataset, article, book , red team OSINT for hackers and OSINT tips and OSINT branch. This repository will grow every time will research, there is a research, science and technology, tutorial. Please use it wisely">
    <meta property="og:image" content="https://private-user-images.githubusercontent.com/71226310/428317009-37d7d761-c1f3-40f5-9ecd-d79457ee8a6e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDMyNTg0OTEsIm5iZiI6MTc0MzI1ODE5MSwicGF0aCI6Ii83MTIyNjMxMC80MjgzMTcwMDktMzdkN2Q3NjEtYzFmMy00MGY1LTllY2QtZDc5NDU3ZWU4YTZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzI5VDE0MjMxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkNTNlMWQwNmQ4NTNkYjQ0NzBlOTg4NmI1YWZjYzM5OTUyMWE5MDQzMjc1MjBkOTE4YmZiZWUxYTAwZmQxZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.qn1nKRcHpLc_b9MH7EwEip5_XFFkWimN_3091SDCvzg">
    <meta property="og:url" content="https://github.com/Jieyab89/OSINT-Cheat-sheet">
    <meta property="og:type" content="website">

    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="Jieyab89 OSINT Cheat Sheet">
    <meta name="twitter:description" content="Jieyab89 OSINT cheat sheet, list OSINT tools, wiki, dataset, article, book , red team OSINT for hackers and OSINT tips and OSINT branch. This repository will grow every time will research, there is a research, science and technology, tutorial. Please use it wisely">
    <meta name="twitter:image" content="https://private-user-images.githubusercontent.com/71226310/428317009-37d7d761-c1f3-40f5-9ecd-d79457ee8a6e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NDMyNTg0OTEsIm5iZiI6MTc0MzI1ODE5MSwicGF0aCI6Ii83MTIyNjMxMC80MjgzMTcwMDktMzdkN2Q3NjEtYzFmMy00MGY1LTllY2QtZDc5NDU3ZWU4YTZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAzMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMzI5VDE0MjMxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBkNTNlMWQwNmQ4NTNkYjQ0NzBlOTg4NmI1YWZjYzM5OTUyMWE5MDQzMjc1MjBkOTE4YmZiZWUxYTAwZmQxZjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.qn1nKRcHpLc_b9MH7EwEip5_XFFkWimN_3091SDCvzg">
    <meta name="twitter:site" content="@jieyab89">

    <meta name="theme-color" content="#ffffff">
    <meta name="format-detection" content="telephone=no">
    
    <link rel="canonical" href="https://jieyab89.github.io/OSINT-Cheat-sheet/Web-Based/">

    <!-- Favicon -->
    <link rel="icon" href="https://avatars.githubusercontent.com/u/71226310?s=96&v=4" type="image/x-icon">

    <title>Jieyab89 OSINT Cheat Sheet</title>

    <script src="https://d3js.org/d3.v6.min.js"></script>
    
    <style>
        body {
            font-family: 'Courier New', monospace;
            background: radial-gradient(ellipse at center, #000015 0%, #000000 100%);
            color: #ffffff;
            text-align: center;
            margin: 0;
            padding: 0;
            overflow: hidden;
        }
        #search {
            margin: 2px;
            padding: 8px;
            width: 85%;
            max-width: 450px;
            font-size: 16px;
            border-radius: 5px;
            border: none;
        }
        svg {
            width: 100vw;
            height: 100vh;
        }
        .node circle {
            stroke: #ffffff;
            stroke-width: 5px;
            cursor: pointer;
        }
        .link {
            stroke: #888;
            stroke-width: 1.5px;
        }
        text {
            font-size: 15px;
            fill: #ffffff;
            pointer-events: none;
        }

        .link {
        stroke: #888;
        stroke-width: 1.2;
        fill: none;
        stroke-dasharray: 6 6;
        animation: flow 1.6s linear infinite;
        opacity: 0.9;
        }

        @keyframes flow {
        from {
            stroke-dashoffset: 0;
        }
        to {
            stroke-dashoffset: -24;
        }
        }
    </style>
    
</head>
<body>
    <h1>Jieyab89 OSINT Cheat Sheet</h1>
    <input type="text" id="search" placeholder="Search by Category Name and Jieyab89 Wiki's">
    <svg></svg>
    <script>
        const BATCH_SIZE = 5;
        const BASE_RADIUS = 140;
        const DRIFT_SPEED = 0.25;
        const SEPARATION_DIST = 42;
        const SEPARATION_FORCE = 0.015;

        let rawData = [];
        let nodes = [];
        let links = [];
        let nodeMap = new Map();
        let urlIndex = new Map();

        function rand(min, max) {
        return Math.random() * (max - min) + min;
        }

        function normalizeUrl(url) {
        return url.trim().toLowerCase();
        }

        function linkExists(a, b) {
        return links.some(l =>
            (l.source === a && l.target === b) ||
            (l.source === b && l.target === a)
        );
        }

        fetch('osint_data.json')
        .then(r => r.json())
        .then(data => {
        rawData = data;
        initCategories();
        requestAnimationFrame(idleMotion);
        });

        function initCategories(filtered = null) {
        nodes = [];
        links = [];
        nodeMap.clear();
        urlIndex.clear();

        const data = filtered || rawData;
        const cx = innerWidth / 2;
        const cy = innerHeight / 2;

        data.forEach(cat => {
            const n = {
            id: cat.category,
            label: cat.category,
            type: 'category',
            _items: cat.items,
            _offset: 0,
            x: cx + rand(-400, 400),
            y: cy + rand(-260, 260),
            vx: rand(-DRIFT_SPEED, DRIFT_SPEED),
            vy: rand(-DRIFT_SPEED, DRIFT_SPEED),
            dragging: false
            };
            nodes.push(n);
            nodeMap.set(n.id, n);
        });

        render();
        }

        function handleUrlCorrelation(node) {
        if (!node.url) return;
        const key = normalizeUrl(node.url);

        if (!urlIndex.has(key)) urlIndex.set(key, new Set());

        urlIndex.get(key).forEach(otherId => {
            if (!linkExists(node.id, otherId)) {
            links.push({ source: node.id, target: otherId, type: "correlation" });
            }
        });

        urlIndex.get(key).add(node.id);
        }

        function expandNode(parent) {
        if (!parent._items || parent._offset >= parent._items.length) return;

        const start = parent._offset;
        const end = Math.min(start + BATCH_SIZE, parent._items.length);
        const radius = BASE_RADIUS + (parent.type === 'category' ? 80 : 140);

        for (let i = start; i < end; i++) {
            const item = parent._items[i];
            if (nodeMap.has(item.name)) continue;

            const c = {
            id: item.name,
            label: item.name,
            type: parent.type === 'category' ? 'tool' : 'subtool',
            url: item.url || null,
            parent: parent.id,
            _items: item.children || [],
            _offset: 0,
            x: parent.x + rand(-radius, radius),
            y: parent.y + rand(-radius, radius),
            vx: rand(-DRIFT_SPEED, DRIFT_SPEED),
            vy: rand(-DRIFT_SPEED, DRIFT_SPEED),
            dragging: false
            };

            nodes.push(c);
            nodeMap.set(c.id, c);
            links.push({ source: parent.id, target: c.id, type: "parent" });
            handleUrlCorrelation(c);
        }

        parent._offset = end;
        render();
        }

        document.getElementById("search").addEventListener("keydown", e => {
        if (e.key !== "Enter") return;
        const q = e.target.value.trim().toLowerCase();
        if (!q) return initCategories();

        initCategories(rawData.filter(c =>
            c.category.toLowerCase().includes(q)
        ));
        });

        let zoomLayer, graphLayer, nodeSel, linkSel;

        function render() {
        d3.select("svg").selectAll("*").remove();

        const svg = d3.select("svg")
            .attr("width", innerWidth)
            .attr("height", innerHeight)
            .call(
            d3.zoom()
                .scaleExtent([0.3, 5])
                .on("zoom", e => {
                zoomLayer.attr("transform", e.transform);
                })
            );

        zoomLayer = svg.append("g");
        graphLayer = zoomLayer.append("g");

        linkSel = graphLayer.selectAll("line")
            .data(links)
            .enter()
            .append("line")
            .attr("class", d =>
            d.type === "correlation" ? "link correlation" : "link"
            );

        nodeSel = graphLayer.selectAll("g")
            .data(nodes)
            .enter()
            .append("g")
            .attr("transform", d => `translate(${d.x},${d.y})`)
            .call(
            d3.drag()
                .on("start", (e, d) => {
                d.dragging = true;
                e.sourceEvent.stopPropagation(); 
                })
                .on("drag", (e, d) => {
                const dx = e.x - d.x;
                const dy = e.y - d.y;
                d.x = e.x;
                d.y = e.y;

                nodes.forEach(n => {
                    if (n.parent === d.id) {
                    n.x += dx;
                    n.y += dy;
                    }
                });
                update();
                })
                .on("end", (e, d) => d.dragging = false)
            );

        nodeSel.append("circle")
            .attr("r", d =>
            d.type === 'category' ? 18 :
            d.type === 'tool' ? 11 : 8
            )
            .attr("fill", d =>
            d.type === 'category' ? "#ff5733" :
            d.type === 'tool' ? "#1e90ff" : "#00ffaa"
            );

        nodeSel.append("text")
            .attr("dy", -20)
            .attr("text-anchor", "middle")
            .attr("font-size", "12px")
            .text(d => d.label);

        nodeSel
            .on("click", (e, d) => d.url && window.open(d.url, "_blank"))
            .on("dblclick", (e, d) => expandNode(d));

        update();
        }

        function update() {
        nodeSel.attr("transform", d => `translate(${d.x},${d.y})`);
        linkSel
            .attr("x1", d => nodeMap.get(d.source).x)
            .attr("y1", d => nodeMap.get(d.source).y)
            .attr("x2", d => nodeMap.get(d.target).x)
            .attr("y2", d => nodeMap.get(d.target).y);
        }

        function idleMotion() {
        const cx = innerWidth / 2;
        const cy = innerHeight / 2;
        const boundX = innerWidth * 0.45;
        const boundY = innerHeight * 0.35;

        nodes.forEach((a, i) => {
            if (a.dragging) return;

            a.x += a.vx;
            a.y += a.vy;

            if (a.x < cx - boundX || a.x > cx + boundX) a.vx *= -1;
            if (a.y < cy - boundY || a.y > cy + boundY) a.vy *= -1;

            for (let j = i + 1; j < nodes.length; j++) {
            const b = nodes[j];
            const dx = a.x - b.x;
            const dy = a.y - b.y;
            const dist = Math.sqrt(dx*dx + dy*dy);

            if (dist > 0 && dist < SEPARATION_DIST) {
                const push = (SEPARATION_DIST - dist) / SEPARATION_DIST * SEPARATION_FORCE;
                a.x += dx * push;
                a.y += dy * push;
                b.x -= dx * push;
                b.y -= dy * push;
            }
            }
        });

        update();
        requestAnimationFrame(idleMotion);
        }
    </script>
</body>
</html>

```

Example code for check account register at spotify&#x20;

Analysis request - Valid email address&#x20;

If email was registered will return 400 HTTP error code with the response message like image below&#x20;

<figure><img src="/files/0AXvenGjulJdK8EzlYZk" alt=""><figcaption></figcaption></figure>

Analysis request - Not valid email address&#x20;

If email available will return 200 HTTP error code with the response message like image below&#x20;

<figure><img src="/files/1Yh7EffGOPUR7HWy6JMZ" alt=""><figcaption></figcaption></figure>

After that you can make a script for automation parsing the email address at spotify&#x20;

Example code in Python&#x20;

```python
# This jsut example test, if want to powerfull and accurate need deep aalysis 
import requests
import time
import uuid

def check_spotify_email(email: str) -> str:
    url = "https://spclient.wg.spotify.com/signup/public/v2/account/validate"

    headers = {
        "Host": "spclient.wg.spotify.com",
        "Content-Type": "application/json",
        "Accept": "application/json",
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
        "Origin": "https://www.spotify.com",
        "Referer": "https://www.spotify.com/signup/",
        "Sec-Fetch-Site": "same-site",
        "Sec-Fetch-Mode": "cors",
        "Sec-Fetch-Dest": "empty",
        "Accept-Language": "en-US,en;q=0.9",
    }

    payload = {
        "fields": [{"field": "FIELD_EMAIL", "value": email.strip()}],
        "client_info": {
            "api_key": "a1e486e2729f46d6bb368d6b2bcda326",
            "app_version": "v2",
            "capabilities": [1],
            "installation_id": str(uuid.uuid4()),          # fresh every time
            "platform": "www",
            "client_id": ""
        },
        "tracking": {
            "creation_point": "https://www.spotify.com/signup"
        }
    }

    try:
        r = requests.post(url, headers=headers, json=payload, timeout=10)

        # We MUST read the JSON even on 400
        try:
            data = r.json()
        except:
            return "bad response (not json)"

        # The key check ? look for already_exists regardless of status code
        if "error" in data and "already_exists" in data["error"]:
            return "registered"

        # If we got here and status is 200 ? usually available
        if r.status_code == 200:
            return "not registered"

        # Other cases (400 without already_exists, 429, etc)
        return f"unexpected status {r.status_code}"

    except Exception as e:
        return f"error: {str(e)}"


# ????????????????????????????????????????????????
print("Spotify Email Checker")
print("Enter email or type 'exit'\n")

while True:
    email = input("Email: ").strip()
    if email.lower() in ['exit', 'q', 'quit']:
        break
    if not email or '@' not in email:
        print("Invalid email\n")
        continue

    result = check_spotify_email(email)
    print(f"{email} ? {result}\n")

    time.sleep(1.2)

```

<figure><img src="/files/fmQROfEYpIKJMXBqRAkl" alt=""><figcaption></figcaption></figure>

On web or fronted&#x20;

<figure><img src="/files/eQY3yj43Ep7CDOhsU7GX" alt=""><figcaption></figcaption></figure>

If you want more something special like bypass the captcha, more accurate need take more time, analysis the API and check each endpoint both on mobile android, ios and web apps target&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jieyab89-osint.gitbook.io/jieyab89-osint-cheat-sheet-wiki-tips/scripting-for-osint/basic-programming-language.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
