How aryann019x/anonymity-tool works
Project Type and Purpose
• This is a command-line, single-script tool designed specifically for enhancing network anonymity on Kali Linux.
• Its primary function is to automatically configure Tor, ProxyChains, DNS, and UFW firewall rules while also providing status checks and backup/restore operations.
• Although it’s implemented as one script, its functionality is clearly modular and touches multiple system components (system configuration files, services, etc).
File Structure
• With only three top-level files, the tool is self-contained in a single script.
Main Components
• User Interface (CLI): The script takes command-line options (“Enable Anonymity”, “Disable Anonymity”, “Show Status”, and “Exit”).
• Core Controller Module: At the heart lies the main execution flow which directs the overall operation, parsing input and triggering the correct actions.
• Tor Configuration Module: Handles starting, stopping, and verifying the Tor service.
• ProxyChains Module: Adjusts /etc/proxychains.conf and sets up proxy configurations.
• DNS Settings Module: Updates /etc/resolv.conf (and uses the backup file), ensuring that DNS leak protection is attempted.
• Firewall (UFW) Management Module: Applies a default deny policy and configures only the necessary ports.
• Dependency and Environment Setup: Checks whether required packages (tor, proxychains, curl) are installed; installs them if missing.
• Logging Module: Records operations and error messages to a log file (anonymity_log.txt).
• Status and Recovery Module: Helps in monitoring the current state, verifying that settings are active, and restoring original settings when disabling anonymity.
Relationships and Interactions
• The CLI interface receives user commands and sends them to the Core Controller.
• The Core Controller then makes calls to each functional module as needed, which in turn interact with the underlying system (file system changes, system calls for service control).
Architectural Patterns
• Separation of concerns: each module should be clearly annotated with its responsibilities.
• Error handling and backup/restore pathways as part of the overall flow, showing fallback to the original system configuration upon “Disable Anonymity.”
Relevant Technologies and Environment Details
• Operating System: Kali Linux—ensure that is noted.
• Services/Tools: Tor, ProxyChains, UFW firewall.
• Dependencies: Packages such as curl, and the fact that root privileges are required.
• External Configurations: Files modified (/etc/proxychains.conf, /etc/resolv.conf, and its .bak file) should be included.