A python wrapper for tor to browse sites anonymously.
- Linux based OS
- 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
- Install package using pip
pip install git+ssh://[email protected]/vivekkumar2696/tor-wrapper-python.git
- 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
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)