tor

Multiple TOR Exit Nodes - Controller Not Working?

半腔热情 提交于 2019-12-05 10:03:40
问题 I'm trying to use Multiple TOR exit nodes with Selenium, and I'm trying to create a function that changes the multiple identities. However, it doesn't, and returns no error. I believe there's a problem with my code that I can't quite figure out. Perhaps the controller is failing? (I have stderr() outputted to a file and I get nothing every time. And I've also killed each process of TOR) Here's my code: import socks import socket import subprocess import stem.connection import stem.socket from

How to scrape a website with the socksify gem (proxy)

ぃ、小莉子 提交于 2019-12-05 06:45:52
问题 I am reading through the documentation of the socksify gem on Rubyforge. I have installed the gem successfully, and I have run this documented code with success to test that my local implementation can replicate it: require 'socksify/http' uri = URI.parse('http://rubyforge.org/') Net::HTTP.SOCKSProxy('127.0.0.1', 9050).start(uri.host, uri.port) do |http| http.get(uri.path) end # => #<Net::HTTPOK 200 OK readbody=true> But how do I e.g. scrape 'http://google.com/' , and get the html content? I

Selenium WebDriver + Tor as proxy with Stem?

大憨熊 提交于 2019-12-04 23:49:29
问题 I need to confirm If Stem can be used to launch a Tor process that exposes 127.0.0.1:port, then use it on selenium scripts as proxy (SOCKS). I'm using Python 3.4.2 , Stem 1.3.0, and Tor (tor-win32-tor-0.2.5.10 expert bundle) on Windows. This piece of code works with a standard SOCKS proxy. from selenium import webdriver from selenium.webdriver.firefox.firefox_profile import FirefoxProfile profile = FirefoxProfile() profile.set_preference('network.proxy.type', 1) profile.set_preference(

Python ssh using Tor proxy

杀马特。学长 韩版系。学妹 提交于 2019-12-04 22:47:07
问题 I would like to be able to send data through Tor when I use ssh from Python scripts. Tor works as expected when I use an OpenSSH client to manually ssh to the host. This is my ssh config file. I use connect-proxy with ProxyCommand to route the connections through Tor (again, this works fine via a standard OpenSSH client): host host user user hostname host.domain.com CheckHostIP no Compression yes Protocol 2 ProxyCommand connect-proxy -S localhost:9050 %h %p I have this Python test script:

Android Orbot malformed reply from SOCKS server

假装没事ソ 提交于 2019-12-04 21:59:15
I am trying to enable TOR support on my own XMPP app in android. I am using orbot as TOR proxy and I have the following code to connect app socket: socket = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("127.0.0.1", 9050))); socket.connect(addr, Config.SOCKET_TIMEOUT * 1000); but I am getting Malformed reply from SOCKS server even that my Orbot is up and running. I believe that this error is thrown when app cant access proxy server or mentioned server is not SOCKS proxy. I have also tried to use jsocks: Socks5Proxy sProxy = new Socks5Proxy("127.0.0.1", 9050); sProxy

C# combining GeckoFX + Tor.NET libraries

随声附和 提交于 2019-12-04 18:14:11
I am trying to combine GeckoFx library and Tor.NET library. In my code I do all preparing to use tor network, ClientCreateParams createParameters = new ClientCreateParams(); createParameters.ConfigurationFile = ConfigurationManager.AppSettings["torConfigurationFile"]; createParameters.ControlPassword = ConfigurationManager.AppSettings["torControlPassword"]; createParameters.ControlPort = Convert.ToInt32(ConfigurationManager.AppSettings["torControlPort"]); createParameters.DefaultConfigurationFile = ConfigurationManager.AppSettings["torDefaultConfigurationFile"]; createParameters.Path = Path

Why Tor cant access localhost pages

拥有回忆 提交于 2019-12-04 17:44:29
问题 I have Tor running and a python script to get web pages: socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050) socket.socket = socks.socksocket print urllib2.urlopen(URL).read() However, if the URL is http://localhost/some_page.html I get the following error: raise Socks5Error(ord(resp[1]),_generalerrors[ord(resp[1])]) TypeError: __init__() takes exactly 2 arguments (3 given) Can someone explain to me what exactly happens? Thank you. 回答1: It is the way protocol is designed. When

How to get HTTPS content using Python Requests through TOR and Privoxy

自古美人都是妖i 提交于 2019-12-04 17:08:14
I have TOR setup on my system with Privoxy that has been tested and works well. What I am trying to do is proxy HTTPS requests through this setup, so that these GET and POSTs come through TOR. Below is the simplest version of the code I could produce: import requests proxy = { 'http':'127.0.0.1:8118','https':'127.0.0.1:8118' } r = requests.get('https://www.whatismyip.com/',proxies=proxy) #r = requests.get('http://www.whatsmyip.org/') print r When using HTTPS, I do not get the response body (r.content is blank), but I do get a 200 status code and I can see the request go out in the Privoxy logs

Result identity changing

断了今生、忘了曾经 提交于 2019-12-04 15:43:14
问题 I'm using TOR and I want to know, how to switch between result-nodes with need country. I can simply change it by telnet the 9051 port like: telnet localhost 9051 "AUTHENTICATE\r" "signal NEWNYM\r" "quit\r" This will chose randomly the exit(result) node. My goal is to change that node to the node from need country. I didn't find such information in the documentation, but in some GUI apps for the TOR there is a map with a list of all available nodes/servers and their country, so that I can

Send and receive via SOCKS5 c++

南楼画角 提交于 2019-12-04 10:38:21
I am playing with SOCKS5 proxy ( TOR ). I am able to estabilish connection but now I dont know how to send and receive data to/from destination. Thanks for help. Code: #include <stdio.h> #include <WinSock2.h> #include <stdlib.h> #pragma comment(lib,"ws2_32.lib") #define PUT_BYTE(ptr,data) (*(unsigned char*)ptr = data) int main() { WORD wVersionRequested = MAKEWORD(2,0); WSADATA wsaData; if(WSAStartup(wVersionRequested,&wsaData) != 0 ) { return 1; } int fd = socket( AF_INET, SOCK_STREAM, 0); if (fd < 0) return 1; struct sockaddr_in destaddr; destaddr.sin_addr.s_addr = inet_addr("xx.xx.xx.xx");