GithubHelp home page GithubHelp logo

Comments (10)

psivesely avatar psivesely commented on May 29, 2024

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.

mjuarezm avatar mjuarezm commented on May 29, 2024

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.

psivesely avatar psivesely commented on May 29, 2024

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.

Zorgatone avatar Zorgatone commented on May 29, 2024

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.

mjuarezm avatar mjuarezm commented on May 29, 2024

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.

Zorgatone avatar Zorgatone commented on May 29, 2024

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.

Zorgatone avatar Zorgatone commented on May 29, 2024

Using TorBrowserDriver(tor_cfg=cm.USE_RUNNING_TOR) will be enough, or is there a password parameter to it?

from tor-browser-selenium.

mjuarezm avatar mjuarezm commented on May 29, 2024

Yes, that's should be enough. The TorBrowserDriver does not talk to the Tor controller.

from tor-browser-selenium.

psivesely avatar psivesely commented on May 29, 2024

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.

Zorgatone avatar Zorgatone commented on May 29, 2024

Oh, I see. Ok.
Thanks!

from tor-browser-selenium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.