Skip to content

Refactor code structure for improved readability and maintainability#72

Open
seilorjunior wants to merge 1 commit intoHunxByts:mainfrom
seilorjunior:main
Open

Refactor code structure for improved readability and maintainability#72
seilorjunior wants to merge 1 commit intoHunxByts:mainfrom
seilorjunior:main

Conversation

@seilorjunior
Copy link

This pull request makes several improvements to the GhostTR.py script, focusing on reliability, performance, and user experience. The most significant changes are the addition of HTTP request configuration, a major refactor and expansion of the social media username search functionality, and improved error handling and output formatting.

HTTP request improvements:

  • Added global HTTP headers, timeout, and thread pool configuration (HEADERS, REQUEST_TIMEOUT, MAX_WORKERS) to ensure requests are more reliable and consistent across the script.
  • Updated all HTTP requests (e.g., IP tracking, IP display) to use the new headers and timeout values, improving robustness against network issues. [1] [2]

Social media username search refactor:

  • Completely refactored the social media username search (TrackLu) to use a much larger and more organized list of platforms (SOCIAL_MEDIA), grouped by theme (major, dating, dev/tech, creative, music/video, blogging, social/community, gaming, finance, misc).
  • Introduced concurrent requests via ThreadPoolExecutor to dramatically speed up username searches across multiple sites, with improved output showing found/not found sites. [1] [2]

Error handling and output:

  • Improved error handling for failed IP lookups and empty usernames, providing clear feedback to the user. [1] [2]
  • Enhanced banner and output formatting for better readability and user experience.

Data handling fixes:

  • Fixed latitude/longitude handling in IP tracking to avoid type errors and ensure correct map link generation.

These changes make the tool faster, more reliable, and easier to use, especially for users searching for social media profiles across many platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants