tor

Why do I get “SOCKS connection failed. Connection not allowed by ruleset” for some .onion sites?

耗尽温柔 提交于 2019-12-04 06:24:12
I'm experimenting with Node and socks5-https-client . For some reason, certain Tor hidden service ( .onion ) sites return with a connection error. For example, connecting to DuckDuckGo ( 3g2upl4pq6kufc4m.onion ) works and returns HTML. However, connecting to The Pirate Bay ( uj3wazyk5u4hnvtk.onion ) or TORCH ( xmh57jrzrnw6insl.onion ) returns... Error: SOCKS connection failed. Connection not allowed by ruleset. What does this error mean? How can I avoid it? Here's code to reproduce it: var shttps = require('socks5-https-client'); shttps.get({ hostname: '3g2upl4pq6kufc4m.onion', path: '',

Proxy not working over SSL connection

北城余情 提交于 2019-12-04 06:23:51
问题 I'm trying to use tor, socksipy and ssl to proxy a ssl connection. My client looks like this: import socks, ssl s = socks.socksocket() s.setproxy(socks.PROXY_TYPE_SOCKS5,"127.0.0.1", 9050) ssl_sock = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1) ssl_sock.connect(('127.0.0.1', 443)) The server just accepts connections and prints getpeername . The peer name is always 127.0.0.1. It doesn't even matter if I give it a non-valid proxy. The client won't complain, it will connect anyway. How do

RSelenium with Tor with NEW RSelenium version on Windows

和自甴很熟 提交于 2019-12-04 06:00:26
I found this fantastic answer by @jdharrison on how to launch Tor using RSelenium on windows: https://stackoverflow.com/a/39048970/7837376 In the new version of RSelenium , however, startServer() is defunct and its replacement rsDriver() does not take a java argument as startServer() did before. What is the way to launch Tor as above in firefox in the new RSelenium syntax? Thanks very much (in advance)! You can start the selenium server yourself instead of using rsDriver browserP <- "C:/Users/john/Desktop/Tor Browser/Browser/firefox.exe" jArg <- paste0("-Dwebdriver.firefox.bin=\"", browserP, "

Tor doesn't work with urllib2

ⅰ亾dé卋堺 提交于 2019-12-04 05:33:04
I am trying to use tor for anonymous access through privoxy as a proxy using urllib2. System info: Ubuntu 14.04, recently upgraded from 13.10 through dist-upgrade. This is a piece of code I am using for test purposes: import urllib2 def req(url): proxy_support = urllib2.ProxyHandler({"http": "127.0.0.1:8118"}) opener = urllib2.build_opener(proxy_support) opener.addheaders = [('User-agent', 'Mozilla/5.0')] return opener.open(url).read() print req('https://check.torproject.org') The above outputs a page with a sorry, but you don't use Tor message. As for my configurations: /etc/tor/torrc

How to develop an application that uses the Tor network? [closed]

守給你的承諾、 提交于 2019-12-04 03:39:11
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I want to develop an application which allows users to also communicate over the Tor network. I have done some Googling but I can't seem to find an API or SDK. How does one develop a Tor application? Are there any libraries out there? EDIT: I see there are no libraries or API's available to use Tor. What would I need to know in order to write this Tor application? This is how: https://stem.torproject

Python Selenium binding with TOR browser

泄露秘密 提交于 2019-12-03 22:18:09
问题 I researched on it but I get that solution: from selenium import webdriver profile = webdriver.FirefoxProfile() profile.set_preference('network.proxy.type', 1) profile.set_preference('network.proxy.socks', '127.0.0.1') profile.set_preference('network.proxy.socks_port', 9050) driver = webdriver.Firefox(profile) driver.get('http://estoeslapollaconcebol.la') It gives that error: Can't load the profile. Profile Dir: C:\Users\HPPAV1~1\AppData\Local\Temp\tmppcuwx3xd Firefox output: None When I try

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

不想你离开。 提交于 2019-12-03 22:11:43
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 wish to parse it with e.g. Nokogiri like this: Nokogiri::HTML(open("http://google.com/)) require

Multiple TOR Exit Nodes - Controller Not Working?

梦想的初衷 提交于 2019-12-03 21:25:38
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 selenium import webdriver from stem.control import Controller global requiredTorRelays global child

Connect to .onion websites on tor using python?

天大地大妈咪最大 提交于 2019-12-03 18:10:25
问题 Here is the code that i have till now import socks import socket import requests import json socks.setdefaultproxy(proxy_type=socks.PROXY_TYPE_SOCKS5, addr="127.0.0.1", port=9050) socket.socket = socks.socksocket data = json.loads(requests.get("http://freegeoip.net/json/").text) and it works fine. The problem is when i use a .onion url it shows error Failed to establish a new connection: [Errno -2] Name or service not known After researching a little i found that although the http request is

How to control tor, when use tor proxy

那年仲夏 提交于 2019-12-03 18:05:53
问题 I'm trying to connect to a resource using a tor, changing identity. But after the first connection attempt to change identity causes an error. Code: import urllib2, socks, socket from stem import Signal from stem.control import Controller def newI(): with Controller.from_port(port=9051) as controller: controller.authenticate() controller.signal(Signal.NEWNYM) newI() socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050) socket.socket = socks.socksocket headers = {'User-Agent':