tor

bypass cloudflare protection with casperjs or phantomjs while using tor proxy

我是研究僧i 提交于 2019-12-12 03:34:41
问题 I use tor to access casperjs via this socks proxy my OS windows 10 x64 my test.js var casper = require('casper').create({ verbose: true, logLevel: 'error', pageSettings: { loadImages: false, // The WebPage instance used by Casper will loadPlugins: false, // use these settings userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36' } }); var caturl = ('http://www.test.com'); casper.start(caturl, function() { this.echo(this

Accessing youtube via stem (tor) gives unable to reach url error

孤人 提交于 2019-12-12 03:06:08
问题 I have combined this example in stem with pytube to measure the time it takes for me to download a youtube video via Tor. Here's the code: import io import pycurl import stem.process from stem.util import term import pickle import socks # SocksiPy module import socket import urllib from pytube import YouTube import pdb import time import string import random SOCKS_PORT = 9050 # Set socks proxy and wrap the urllib module socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', SOCKS_PORT)

stem not recognizing tor's path

不羁的心 提交于 2019-12-12 02:57:36
问题 While running Stem's To Russia With Love example, I got the following error: 'tor' isn't available on your system. Maybe it's not in your PATH To solve this, I added the following path to tor_cmd as shown in the example over here: tor_process = stem.process.launch_tor_with_config( tor_cmd = '~/Downloads/tor-browser_en-US/Browser/TorBrowser/Tor/tor', config = { 'SocksPort': str(SOCKS_PORT), 'ExitNodes': '{ru}', }, init_msg_handler = print_bootstrap_lines, ) However, its now giving me the error

Trying to automate Tor to do something on a site and change identity each time. Need some guidance

有些话、适合烂在心里 提交于 2019-12-12 01:56:20
问题 I really need some help with automating Tor to do something on a site (in this case, check something on a poll) and then restart Tor with a new identity. I have never done anything remotely close to this. I only know HTML, CSS and JS fairly well. Now, to sum up, I want to make a loop that repeatedly accesses a site on Tor, checks something on that site and then restarts Tor with a new identity. If anyone could give me some guidance and tell me what I can use, it would be much appreciated. I

Change tor proxy by tor control protocol

怎甘沉沦 提交于 2019-12-12 01:10:12
问题 I want to change automaticaly tor proxy settings in PHP through tor control protocol, but I don't know the appropriate command to do that. I tried : GETCONF HTTPProxyAddr or GETCONF HTTPProxyPort but tor answered : 510 Unrecognized command What are the keywords to control the proxy used in front of tor? Thanks 回答1: The correct command to regenerate a tor route is SIGNAL NEWNYM . Here's some quick sample code: <?php $sock = fsockopen( 'unix://control' ); fwrite( $sock, "AUTHENTICATE\n" ); echo

How do I configure maven to use Tor?

只愿长相守 提交于 2019-12-11 18:59:51
问题 I have looked at the documentation for proxy settings (specifcally the proxy mini-howto) in order to use maven with Tor. When I try to connect to Tor with the default port 9050, there is an error in the Tor message center that states Warning: Socks version 71 not recognized. (Tor is not an http proxy) . How do I configure maven to work through tor? (Also note that the suggestions at the Stackoverflow question How do I use maven through a proxy? were not succesful) 回答1: Since tor is not an

How to only send certain requests with Tor in python?

时光毁灭记忆、已成空白 提交于 2019-12-11 15:29:46
问题 right now i am using the following code to port my python through tor to send requests: socks.set_default_proxy(socks.SOCKS5, "127.0.0.1", 9450) socket.socket = socks.socksocket I put this at the front of my code and then start sending requests, and all my requests will be sent through tor. In my code I need to send a lot of requests, but only 1 of them needs to actually go through tor. The rest of them don't have to go through tor. Is there any way I can configure my code so that I can

urllib2 proxy does not work with tor

谁说我不能喝 提交于 2019-12-11 14:36:53
问题 I want to write some script with python which uses tor/proxy addresses to access web, for the test I have the following script: import urllib2 from BeautifulSoup import BeautifulSoup protocol = 'socks4' ip = '127.0.0.1:9050' proxy = urllib2.ProxyHandler({protocol:ip}) opener = urllib2.build_opener(proxy) urllib2.install_opener(opener) page = urllib2.urlopen("http://www.ifconfig.me/ip").read() print(page) The problem is it shows my own IP address, while when run directly from terminal:

How generate a valid private (RSA 1024) key for a tor onion service using java?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 13:46:01
问题 I'm trying to generate a valid private key for a tor onion service in java. With this private key I want to get a valid .onion address. I have run various combinations (with this bit/without that bit) of the code below KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); keyPairGenerator.initialize(1024); KeyPair keyPair = keyPairGenerator.generateKeyPair(); PrivateKey privateKeyGenerated = keyPair.getPrivate(); KeyFactory keyFactory = KeyFactory.getInstance("RSA");

Tor's stem module (python) loading but not unloading config

做~自己de王妃 提交于 2019-12-11 11:20:38
问题 So in Tor's python module, Stem, I can add hidden services, replace hidden services, etc. However! I cannot remove ALL hidden services. I do not know the magic magicness that does this... I've tried setting 'HiddenServiceDir/HiddenServicePort' and 'HiddenServiceOptions' to empty strings, empty lists and None. The only thing that does anything is setting 'HiddenServiceOptions' to None... which just brings back the last successful hidden service setting.... meaning that probably everything in