# How to Build GhostTrack from Source: Complete Installation Guide

> Build GhostTrack from source with our complete installation guide. Clone the repository, install Python dependencies, and launch the OSINT tool easily. Get started now.

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

---

**To build GhostTrack from source, clone the HunxByts/GhostTrack repository, install the Python dependencies listed in [`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt), and execute `python3 GhostTR.py` to launch the interactive OSINT menu.**

GhostTrack is a lightweight Python-based OSINT (Open Source Intelligence) tool maintained by HunxByts that provides IP geolocation, phone number validation, and social media username reconnaissance. Because it runs as an interpreted script rather than a compiled binary, you can build GhostTrack from source quickly without complex build chains. This guide covers the exact commands and source code structure needed to get the tool running on Linux, macOS, Windows, or Termux.

## Prerequisites

Before building GhostTrack from source, ensure your system meets the following requirements:

- **Python 3.x** installed and accessible via `python3` or `python`
- **pip3** (Python package installer)
- **git** (to clone the repository)

The tool is cross-platform and runs on any environment that supports Python 3.

## Step-by-Step Build Instructions

### 1. Clone the Repository

Retrieve the source code from GitHub into a local directory named `GhostTrack`:

```bash
git clone https://github.com/HunxByts/GhostTrack.git
cd GhostTrack

```

This downloads [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py), [`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt), and the `asset/` directory containing documentation images.

### 2. Install Python Dependencies

Install the required third-party libraries specified in [`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt):

```bash
pip3 install -r requirements.txt

```

This command installs **requests** (for HTTP API calls) and **phonenumbers** (for phone number parsing and validation). These are the only external dependencies required to run the application.

### 3. Launch the Application

Start the tool by executing the main script:

```bash
python3 GhostTR.py

```

The script immediately calls `main()` (defined at the bottom of [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py)), which clears the screen, renders the ASCII banner, and presents the interactive menu system.

## Source Code Architecture Overview

Understanding the source structure helps when customizing or troubleshooting the build.

### Entry Point

Execution begins at the standard Python entry point in [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py):

```python
if __name__ == '__main__':
    try:
        main()
    except KeyboardInterrupt:
        # Handles clean exit on Ctrl+C

        pass

```

The `main()` function initializes the menu loop that accepts user input.

### Core Components

The file [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py) organizes functionality into four distinct feature functions:

- **`IP_Track()`** – Queries `http://ipwho.is/<ip>` via `requests.get()` and parses JSON responses for geolocation data
- **`phoneGW()`** – Uses the **phonenumbers** library to validate, format, and extract carrier information from international phone numbers
- **`TrackLu()`** – Iterates through hard-coded social media URL templates to check username availability across platforms
- **`showIP()`** – Calls `https://api.ipify.org/` to display the host's public IP address

Each function is wrapped by the **`@is_option`** decorator (defined around line 29), which automatically clears the terminal and prints the banner before executing the selected feature.

### Menu Dispatch Logic

The menu system relies on `option()` (around line 80) to display choices, while `execute_option()` and `call_option()` handle input validation and function dispatch. When you select an option, `call_option()` looks up the corresponding dictionary entry and invokes the stored function reference.

## Practical Usage Examples

Once you have built GhostTrack from source, verify the installation with these common workflows.

### IP Address Tracking

Select option `1` from the menu and provide a target IP:

```bash
$ python3 GhostTR.py
Select Option : 1
Enter IP target : 8.8.8.8

============= SHOW INFORMATION IP ADDRESS =============
IP target       : 8.8.8.8
Type IP         : ipv4
Country         : United States
Region          : California
City            : Mountain View
ISP             : Google LLC
Maps            : https://www.google.com/maps/@37,-122,8z

```

The script contacts the `ipwho.is` API and formats the JSON response into human-readable output.

### Phone Number Validation

Select option `3` to parse international phone numbers:

```bash
Select Option : 3
Enter phone number target [+6281xxxxxxxxx] : +628123456789

========== SHOW INFORMATION PHONE NUMBERS ===========
Location             : Indonesia
Region Code          : ID
Timezone             : Asia/Jakarta
Operator             : Telkomsel
Valid number         : True
International format : +62 812-3456-789
Type                 : This is a mobile number

```

The **phonenumbers** library handles parsing, validation, and carrier detection automatically.

### Username Reconnaissance

Select option `4` to check username availability across social platforms:

```bash
Select Option : 4
Enter Username : alice

========== SHOW INFORMATION USERNAME ===========
[ + ] Facebook : https://www.facebook.com/alice
[ + ] Twitter : Username not found !
[ + ] Instagram : https://www.instagram.com/alice

```

The function `TrackLu()` iterates through URL templates, performs GET requests, and reports HTTP 200 responses as confirmed profiles.

## Summary

Building GhostTrack from source requires minimal setup and no compilation steps:

- Clone the repository from `https://github.com/HunxByts/GhostTrack.git`
- Install dependencies using `pip3 install -r requirements.txt` (requires **requests** and **phonenumbers**)
- Execute `python3 GhostTR.py` to start the interactive menu
- The entry point `main()` in [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py) dispatches to `IP_Track()`, `phoneGW()`, `TrackLu()`, or `showIP()` based on user selection

The tool runs entirely within the Python interpreter, making it portable across operating systems.

## Frequently Asked Questions

### Do I need to compile GhostTrack from source?

No compilation is required. GhostTrack is a pure Python application. After cloning the repository and installing dependencies from [`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt), you run the interpreted script directly with `python3 GhostTR.py`. There are no build scripts, makefiles, or binary compilation steps involved.

### What are the system requirements to build GhostTrack?

You only need Python 3.x and pip3. The [`requirements.txt`](https://github.com/HunxByts/GhostTrack/blob/main/requirements.txt) file specifies two libraries: **requests** (for HTTP networking) and **phonenumbers** (for phone metadata parsing). These install automatically via pip. The tool runs on Linux, macOS, Windows, and Android Termux environments without modification.

### Can I run GhostTrack on Termux or mobile devices?

Yes. The build process is identical on Termux for Android. Install Python and git via `pkg install python git`, then follow the standard clone and pip install steps. Execute `python3 GhostTR.py` to launch the menu. The source code uses cross-platform system calls in `clear()` (checking for Windows vs. Unix) to ensure compatibility.

### Where is the main execution logic located in the source code?

The primary execution logic resides in [`GhostTR.py`](https://github.com/HunxByts/GhostTrack/blob/main/GhostTR.py). The script entry point is at the final lines of the file where `if __name__ == '__main__': main()` invokes the `main()` function. This function initializes the menu system defined around line 80, which then dispatches to feature-specific functions like `IP_Track()` or `phoneGW()` based on user input.