bhargavnova / python-helper-modules

MIT License
9 stars 24 forks source link

Python Requests Lib Tor Connection Script with IP Change Verification šŸŒšŸ”’ #11

Closed bhargavnova closed 1 year ago

bhargavnova commented 1 year ago

Objective:

Create a Python script or module that establishes a connection over the Tor network, ensuring anonymity, and includes functionality to verify that the IP address has changed.

Mainly this module should redirect requests made through the Python requests library over the Tor network, Once tor is set up through this script any requests made from the same script will automatically redirected.

Features:

  1. Tor Connection Setup:

    • Implement a function to establish a connection through the Tor network, ensuring anonymous browsing.
  2. IP Change Verification:

    • Develop a mechanism to confirm that the IP address has changed after connecting through Tor.
    • well you can use Tor's official website that has information, whether you are connected to Tor or not. https://check.torproject.org/
    • Or you can simply fetch IP info from any website ex: https://httpbin.org/ip
  3. User-Friendly Output:

    • Provide clear feedback on the Tor connection status and IP address verification.
    • Simple one-line logging is enough for user.

Example Usage:

# Example usage of the Tor connection script
import tor_connector

# Connect to Tor network
tor_connector.connect()

# Check if the IP address has changed
ip_changed = tor_connector.verify_ip_change()

if ip_changed:
    print("IP address has changed.")
else:
    print("IP address remains the same.")

Difficulty: Beginner/Intermediate

Tags: Python, Tor Network, Anonymity, IP Verification, Security

Additional Information:

Zhreyu commented 1 year ago

hey can I work on this?

bhargavnova commented 1 year ago

Sure!!

bhargavnova commented 1 year ago

Thanks for your contribution :)