Skip to content

vivekkumar2696/tor-wrapper-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tor-wrapper-python

A python wrapper for tor to browse sites anonymously.

Development

Prerequisites:-
  1. Linux based OS
  2. Tor must be installed on the system.
    $ echo "deb http://http.kali.org/kali kali-rolling main contrib non-free" > /etc/apt/sources.list
    $ apt install tor
Sample steps
  1. Install package using pip
 pip install git+ssh://[email protected]/vivekkumar2696/tor-wrapper-python.git
  1. Sample python code
from bizarre.tor import Tor
sudo_pwd = None # Optional. If not specified, there would be a prompt later to ask for password

tor = Tor()
tor.restart_tor(sudo_pwd)
br = tor.create_browser()
url='https://api.covid19india.org/states_daily.json'

response = br.open(url)
print(response.read())

create_browser() returns a mechanize._mechanize.Browser object

Update Identity
from bizarre.tor import Tor
sudo_pwd = None # Optional. If not specified, there would be a prompt later to ask for password

tor = Tor()
tor.restart_tor(sudo_pwd)

About

A library to use tor using python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages