How to Build GhostTrack from Source: Complete Installation Guide
To build GhostTrack from source, clone the HunxByts/GhostTrack repository, install the Python dependencies listed in 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
python3orpython - 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:
git clone https://github.com/HunxByts/GhostTrack.git
cd GhostTrack
This downloads GhostTR.py, requirements.txt, and the asset/ directory containing documentation images.
2. Install Python Dependencies
Install the required third-party libraries specified in requirements.txt:
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:
python3 GhostTR.py
The script immediately calls main() (defined at the bottom of 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:
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 organizes functionality into four distinct feature functions:
IP_Track()– Querieshttp://ipwho.is/<ip>viarequests.get()and parses JSON responses for geolocation dataphoneGW()– Uses the phonenumbers library to validate, format, and extract carrier information from international phone numbersTrackLu()– Iterates through hard-coded social media URL templates to check username availability across platformsshowIP()– Callshttps://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:
$ 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:
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:
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.pyto start the interactive menu - The entry point
main()inGhostTR.pydispatches toIP_Track(),phoneGW(),TrackLu(), orshowIP()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, 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 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. 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.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →