![]() |
|
[Python] Python Selenium | Chromium | Raspberry Pi | How to use Proxy settings of Tor - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Python Selenium | Chromium | Raspberry Pi | How to use Proxy settings of Tor (/showthread.php?tid=6107294) |
Python Selenium | Chromium | Raspberry Pi | How to use Proxy settings of Tor - 0u1law - Sep 4, 2020 Hey Guys, im trying to use Python Selenium on my Raspberry pi but with the proxy settings of the Tor service. But what ever i try it doesn load the page: i mean chromium is starting but it loads until it stops because respond takes to long. i dont know what the problem is. what i have done: file /etc/privoxy/config -> l Code isten-address localhost:8118and Code forward-socks5 / 127.0.0.1:9050 .and then i restartet the service, and yes rebooting was also a try. The python code: Code from selenium.webdriver.common.proxy import Proxy, ProxyTypeany ideas how to solve the problem ? Outputs: cat /proc/version: Linux version 5.4.51-v7+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1327 SMP Thu Jul 23 10:58:46 BST 2020 cat /etc/os-release: PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" 0u1law RE: Python Selenium | Chromium | Raspberry Pi | How to use Proxy settings of Tor - Argonaut.exe - Sep 4, 2020 Have you tried starting tor before launching the program? Also if you need, selenium running on firefox trough tor I’ve the code / geckodriver working which I wrote to pentest my web app RE: Python Selenium | Chromium | Raspberry Pi | How to use Proxy settings of Tor - 0u1law - Sep 5, 2020 (Sep 4, 2020 11:13 PM)Argonaut.exe Wrote: Have you tried starting tor before launching the program? Yes i tried almost everything i found on google. sounds interesting would you like to share your code ? and i can install firefox on my raspberry but cant find the matching geckodriver. i installed it manually but without success. it would be a pleasure if you can give me the links for firefox and geckodriver. iceweasel doesnt exist anymore right ? RE: Python Selenium | Chromium | Raspberry Pi | How to use Proxy settings of Tor - Argonaut.exe - Sep 6, 2020 (Sep 5, 2020 10:52 AM)0u1law Wrote: Yes i tried almost everything i found on google. sounds interesting would you like to share your code ? so I needed some time to recover the project from the server is running on, here the small piece of code to init selenium (remove every import you don't need I was a bit too lazy to do that) Code from __future__ import print_functionI will zip firefox and geckodriver , PM soon. About the use, keep in mind you should bind tor to the port 9050 or anyone just change it in the code, it will be used as proxy by selenium (in my code I also added in the init a SYS signal to change the node of tor... but can't share my whole project :P ) edit: PM sent with gecko and firefox |