Comments (10)
Do you want Tor Browser itself to authenticate to the control port or do you just want to be able to programmatically send the control port commands? I imagine in most scenarios you're automating the browser you'd want the latter. I believe the only control port command Tor Browser will send is NEWNYM and that is when you click "New Identity" in the Torbutton extension menu. You could do the same using stem
.
from tor-browser-selenium.
As @fowlslegs mentioned, you need to use stem
to authenticate to the Tor controller. Check this example: stem_adv.py
. It uses the stem's authenticate
method to which you can pass user and password.
from tor-browser-selenium.
I would use getpass
if you want to interactively prompt for a password each time. Otherwise, setting CookieAuth 1
in your torrc
is easier than using a password (alternatively you can not modify your torrc and instead pass a config
keyword dict to stem.process.launch_tor_with_config
with that option).
from tor-browser-selenium.
I'm already using stem with authentication to send commands programmatically.
I'm just wondering if I need to tell the Tor Browser the password when connecting to Tor when configured with a control password
from tor-browser-selenium.
You can set a password for the Tor controller by setting the HashedControlPassword option in the torrc that the TorBrowserDriver
will use. Again, you can set that option programmatically by making use of stem (see the example).
from tor-browser-selenium.
I'm telling you, that's what I'm already doing. You didn't get what I'm asking.
I start a tor process using stem, and setting the option programmatically using steam (not torrc), and when I connect to the controller (also using stem and HashedControlPassword) I am authenticating correctly.
Now I want to run the tor browser and connecting it to that tor process (Socks doesn't need password, I know that), but I was wondering if I also need to tell the Tor browser (and specifically Tor button) the password for the controller. Probably I don't really need to, as I'm sending commands only using stem
from tor-browser-selenium.
Using TorBrowserDriver(tor_cfg=cm.USE_RUNNING_TOR)
will be enough, or is there a password
parameter to it?
from tor-browser-selenium.
Yes, that's should be enough. The TorBrowserDriver does not talk to the Tor controller.
from tor-browser-selenium.
I'm just wondering if I need to tell the Tor Browser the password when connecting to Tor when configured with a control password
No. That's not necessary unless you plan on driving Selenium to click the TB UI buttons that would send control port commands, such as "New Identity." Since there's no point in doing such a thing when you can send the same command with stem
programmatically, you should be able to just use it as a socks proxy without authenticating to the control port. The only use I could see for authenticating is if you were trying to functionally test the Tor Browser itself.
from tor-browser-selenium.
Oh, I see. Ok.
Thanks!
from tor-browser-selenium.
Related Issues (20)
- The bridge configuration does not take effect
- The bridge configuration does not take effect HOT 1
- disable images loading HOT 1
- почему не поддерживает виндовс и когда будет если будет HOT 1
- Message: Process unexpectedly closed with status 1 HOT 2
- Error with the new version of selenium or python-selenium HOT 2
- Cannot install extensions. HOT 9
- Compatible versions - WebDriverException Message: Process unexpectedly closed with status 255 HOT 9
- Use custom tor build HOT 1
- Message: Process unexpectedly closed with status 1 HOT 2
- Initialization error with Selenium 4.11 HOT 2
- Help me on Mac gecko driver HOT 1
- error with selenium 4.11 and driver HOT 1
- Trouble with tor binary HOT 14
- Cannot install tbselenium HOT 4
- Invalid firefox binary HOT 2
- Process unexpectedly closed with status 255 HOT 1
- Headless mode fails since Selenium 4.12.0 HOT 1
- pip install error HOT 1
- selenium.common.exceptions.WebDriverException: Message: Process unexpectedly closed with status 255 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tor-browser-selenium.