How to Configure GhostTrack: Environment Setup and Source Code Customization
GhostTrack configures entirely through hard-coded constants in GhostTR.py, requiring you to edit the Python source directly—at lines 84, 124‑151, and 79‑106—to change phone regions, social media targets, or menu options.
GhostTrack is a Python-based OSINT CLI tool maintained by HunxByts that consolidates IP geolocation, phone number analysis, and username enumeration into a single interactive menu. Unlike tools that rely on external YAML or JSON configuration files, GhostTrack embeds all operational parameters directly in its main script, meaning you configure GhostTrack by modifying the source code variables in GhostTR.py rather than editing separate config files. This guide covers environment preparation, runtime navigation, and source-level customization.
Environment Preparation and Dependencies
To run GhostTrack, you need a Python 3.x environment on Linux, Unix, or Termux. The tool declares its external dependencies in requirements.txt, which lists only two packages required for HTTP requests and phone number parsing.
Installing Required Packages
The requests library handles HTTP calls to ipwho.is and api.ipify.org, while phonenumbers validates and formats international phone numbers. Install both using:
# Clone the repository
git clone https://github.com/HunxByts/GhostTrack.git
cd GhostTrack
# Install dependencies
pip3 install -r requirements.txt
Runtime Configuration via Interactive Menu
Once dependencies are installed, launching python3 GhostTR.py invokes the main() function, which calls option() and option_text() to render a color-coded menu (defined with ANSI escape codes). User input flows through execute_option() → call_option() and dispatches to one of four built-in trackers.
IP Address Tracking
The IP Tracker command prompts for an IPv4 or IPv6 address and queries http://ipwho.is/<ip>. Response parsing occurs in the IP_Track() function (lines 40‑78). The Show Your IP option retrieves your public address via https://api.ipify.org/ using showIP() (lines 69‑77).
Phone Number Analysis
The Phone Number Tracker uses the phonenumbers library to parse input with a default region defined at line 84. The phoneGW() function (lines 80‑119) handles validation, carrier lookup, timezone detection, and formatting output.
Username Enumeration
The Username Tracker iterates through a social_media array (lines 124‑151) containing 24 URL patterns for platforms like Instagram, Twitter, and GitHub. The TrackLu() function (lines 122‑160) performs HTTP GET requests to each endpoint, marking successful (200) responses as found accounts and noting failures as "Username not found."
Customizing GhostTrack Through Source Code Editing
Because GhostTrack lacks external configuration files, permanent changes require editing constants in GhostTR.py and restarting the script.
Changing the Default Phone Region
By default, GhostTrack parses phone numbers using the Indonesian region code ("ID"). To change this, edit line 84:
# Locate line 84 in GhostTR.py and modify the default_region variable
default_region = "US"
Adding or Removing Social Media Platforms
The social_media list (lines 124‑151) contains dictionaries with url and name keys. Each URL must include a {} placeholder for the username interpolation. To add Reddit support:
# Insert within the social_media list around line 130
{"url": "https://www.reddit.com/user/{}", "name": "Reddit"},
Modifying Menu Options and Order
The options list (lines 79‑106) defines the numeric menu keys, display strings, and function mappings. Adjust this structure to rename menu items, change their sequence, or remove unused trackers entirely.
Summary
- GhostTrack requires no external configuration files; all settings reside in
GhostTR.py. - Install dependencies via
pip3 install -r requirements.txtbefore the first run. - Access runtime features through the interactive menu driven by
main()andoption(). - Change the default phone region by modifying
default_regionat line 84. - Extend social media coverage by editing the
social_medialist at lines 124‑151. - Alter menu text or ordering by adjusting the
optionslist at lines 79‑106.
Frequently Asked Questions
Does GhostTrack use a configuration file?
No. According to the HunxByts/GhostTrack source code, all configuration is hard-coded directly into GhostTR.py. You must edit the Python source to change default behaviors, API endpoints, or the list of social platforms tracked by the TrackLu() function.
What Python version and dependencies are required?
GhostTrack requires Python 3.x and two external packages: requests and phonenumbers, listed in requirements.txt. The tool is designed for Linux/Unix environments including Termux on Android.
How do I add a new social media site to the username tracker?
Locate the social_media list in GhostTR.py around lines 124‑151 and append a dictionary with url (including a {} placeholder) and name keys. For example, adding {"url": "https://www.reddit.com/user/{}", "name": "Reddit"} enables Reddit username enumeration when the TrackLu() function executes.
Where is the default country for phone lookups defined?
The default region is set by the default_region variable on line 84 of GhostTR.py, initialized to "ID" (Indonesia). Changing this value to another ISO country code (such as "US" or "GB") alters how the phonenumbers library parses ambiguous phone numbers in the phoneGW() function.
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 →