# What Technologies Are Used in GhostTrack? A Complete Technical Breakdown

> Explore the technologies behind GhostTrack including Python 3, requests, phonenumbers, and native ANSI escape codes. Get a complete technical breakdown of this project.

- Repository: [K1LLU/GhostTrack](https://github.com/HunxByts/GhostTrack)
- Tags: deep-dive
- Published: 2026-04-29

---

**GhostTrack is built on Python 3 and utilizes the `requests` library for HTTP queries, the `phonenumbers` library for phone validation, and native ANSI escape codes for terminal styling, all orchestrated through a menu-driven architecture in [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py).**

GhostTrack is an open-source OSINT command-line utility hosted at `HunxByts/GhostTrack`. The tool leverages Python’s ecosystem to query external APIs, parse phone metadata, and enumerate social media profiles without requiring a heavy GUI framework.

## Core Language and Architecture

GhostTrack is implemented entirely in **Python 3**, as indicated by the shebang on line 1 of [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py):

```python
#!/usr/bin/python

```

The application follows a simple procedural design centered on a **menu-driven event loop**. The `main()` function displays the banner and waits for user input, while the `options` list (defined on lines 80–107) maps numeric choices to specific tracking functions.

## HTTP Requests and External APIs

Network communication relies on the third-party **`requests`** library, imported on line 9 of [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py). The tool queries two primary endpoints for IP intelligence:

- **`https://api.ipify.org/`** – Called within `showIP()` (lines 71–73) to retrieve the user’s public IP address.
- **`http://ipwho.is/`** – Used in `IP_Track()` (line 45) to fetch geolocation and ISP data for a target IP.

```python
import requests
import json

# IP tracking implementation

def IP_Track():
    ip = input("Enter IP address: ")
    response = requests.get(f"http://ipwho.is/{ip}")
    data = json.loads(response.text)
    print(f"Country: {data['country']}")
    print(f"ISP: {data['connection']['isp']}")

```

## Phone Number Parsing and Validation

For telephone OSINT, GhostTrack incorporates the **`phonenumbers`** package (imported on line 13). This library validates number formats and extracts carrier and geographic metadata without placing actual calls.

```python
import phonenumbers
from phonenumbers import carrier, geocoder

num = phonenumbers.parse("+14155552671", "US")
print(geocoder.description_for_number(num, "en"))
print(carrier.name_for_number(num, "en"))

```

## Terminal Interface and User Experience

The codebase uses **ANSI escape sequences** defined between lines 17–24 to colorize output, providing visual distinction between banners, prompts, and results. Cross-platform console clearing is handled by `clear()` (lines 10–16), which checks `os.name` to determine whether to invoke `cls` or `clear`.

Menu navigation is abstracted through a decorator pattern. The **`@is_option`** decorator (applied to functions like `IP_Track()` on line 40) automatically invokes `run_banner()` before executing the primary logic, ensuring consistent branding across every module.

## Username Enumeration Engine

Social media reconnaissance is performed via hard-coded URL construction (lines 26–50) followed by HTTP GET requests (line 55). The script iterates through a static list of platforms, checking HTTP status codes to confirm whether a profile exists.

```python
username = "target_handle"
profiles = [
    f"https://www.facebook.com/{username}",
    f"https://twitter.com/{username}",
    # ... additional platforms

]

for url in profiles:
    if requests.get(url).status_code == 200:
        print(f"[+] Found: {url}")

```

## Project Structure and Dependencies

The repository organizes its technology stack into three critical files:

- **[`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py)** – Main application script containing the menu system, tracking functions (`IP_Track`, `showIP`, etc.), and utility decorators.
- **[`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt)** – Declares external dependencies (`requests`, `phonenumbers`) for `pip3` installation.
- **[`README.md`](https://github.com/HunxByts/GhostTrack/blob/main/README.md)** – Documentation covering setup and usage instructions.

## Summary

- GhostTrack is written in **pure Python 3** with no compiled extensions.
- Network I/O depends on the **`requests`** library and RESTful APIs (ipify.org, ipwho.is).
- Phone metadata extraction uses the **`phonenumbers`** package.
- The UI relies on **ANSI color codes** and the standard **`os`** module for terminal clearing.
- The architecture is modular, using an **`@is_option`** decorator and a centralized `options` registry to route menu choices to specific OSINT functions.

## Frequently Asked Questions

### Does GhostTrack require Python 3 specifically?

Yes. While the shebang references `/usr/bin/python`, the code utilizes Python 3 syntax and standard library features. The [`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt) file explicitly lists modern package versions compatible with Python 3.6+.

### What are the main external dependencies for GhostTrack?

The tool requires only two third-party packages: **`requests`** for HTTP networking and **`phonenumbers`** for telephone number parsing. All other functionality relies on Python’s built-in `json`, `os`, and `sys` modules.

### How does GhostTrack display colored text in the terminal?

Color output is achieved through raw ANSI escape sequences hard-coded in [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py) (lines 17–24). These codes wrap text strings to change foreground colors before printing to stdout, without using external libraries like `colorama` or `rich`.

### Can GhostTrack be run on Windows?

Yes. The `clear()` function (lines 10–16) detects the operating system via `os.name` and executes the appropriate command (`cls` for Windows, `clear` for Unix-like systems), ensuring cross-platform compatibility for the interactive menu.