Hot answers tagged

4 votes
Accepted

How to assign a stream to a circuit?

Nice timing, we just expanded our tutorials around this! For this you should use new_circuit() and attach_stream() rather than NEWNYM. For an example of doing this see... https://stem.torproject.org/...
user avatar
  • 691
3 votes

I want upload a file to a ftp server using Tor proxy to comunicate with a Hidden Service [Python 3]

The tl;dr is that FTP and .onion do not go well together and never will, due to how the FTP protocol works. For more details, see below. FTP goes a little like this: Client connects to the "command" ...
user avatar
  • 10.8k
3 votes

torcc file missing on Mac OS Sierra?

Open Finder Press Command, Shift, G Enter this command: ~/Library/Application Support/TorBrowser-Data/Tor You should be able to see the Torcc file
user avatar
  • 31
3 votes
Accepted

Stem: How to get current in-use circuit?

I put this example together using this STEM Tutorial. It shows the use of controller.set_conf('__LeaveStreamsUnattached', '1') to make your own circuits, attach a stream, and make a request using ...
user avatar
  • 1,274
3 votes
Accepted

How do I trap "circuit ID = None" errors in the Stem script "exit_used.py"?

Thanks for the catch! Fixed... https://gitweb.torproject.org/stem.git/commitdiff/f46974987106e3246482158e009491faa07bbae4
user avatar
  • 691
3 votes

Problem getting Tor exit node from a bash script

If your configured Tor socks port is 9150, then you can try this command: curl --socks5-hostname localhost:9150 http://ipecho.net/plain You also can configure it by editing your config file (usually ...
user avatar
  • 161
3 votes
Accepted

Setting up Tor for use with stem

What should I be reading? It depends on your platform but since your on a deb based distro it should be easy... https://www.torproject.org/docs/debian.html.en If I use the synaptic package manager ...
user avatar
  • 691
2 votes

Interacting with Tor cloud via python/stem

I think you're confused a little. The Tor cloud instance is not about surfing at all, and there's not too much to interact with for a Tor relay. Exposing a Tor control port over the network is a bad ...
user avatar
  • 2,209
2 votes

Communicating through Tor using Python

If you want to use event-based code (namely Twisted), there's https://github.com/habnabit/txsocksx for client-side stuff (i.e. socks proxy) and http://txtorcon.readthedocs.org/en/latest/ for speaking ...
user avatar
  • 31
2 votes

Stem: How to get current in-use circuit?

To force an application to use a particular circuit your best option is to handle attaching streams to circuits yourself. For an example of this see its tutorial. Usually you'll leave ...
user avatar
  • 691
2 votes

How do you get legit relay bandwidth ballpark figures?

Tor automatically builds the fastest circuits possible for you by attempting to see how much bandwidth is available for each node. It doesn't rely on the client supplied Bandwidth value but actually ...
user avatar
  • 1,274
2 votes
Accepted

Finding available bandwidth of a relay

Not really. You can know it's observed bandwidth, and what it's throughput has been seen to be but not "available" bandwidth. That would require knowledge of, for example, the upperbounds of ...
user avatar
  • 10.8k
1 vote
Accepted

customizing tor browser bundle

There is a project named: torflow and one of the plugins named OP-addon is a good solution for tor path generation and circuit handling with lots of measurements and analyzing goodies. from the ...
user avatar
  • 31
1 vote

Can we query a Relay to get its descriptors?

A Tor relay's descriptor is available at that relay as the resource '/tor/server/authority[.z]'. This is useful when you don't know the relay's fingerprint. Using IPredator as an example: http://197....
user avatar
  • 11
1 vote

WinError 10061 No connection could be made because the target machine actively refused it

No ControlPort is specified in the torrc that your copy of Tor is trying to read. ControlPort PORT|unix:path|auto [flags] ... (Default: 0) With the default of 0 meaning not to create one. Instead ...
user avatar
  • 10.8k
1 vote
Accepted

Which python script allow me to know if tor is operational or not as a client?

You need to query the client bootstrap status. It's done - as it's said in control protocol spec like this: telnet 127.0.0.1 9051 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. ...
user avatar
  • 5,421
1 vote

How to list all tor circuits that have ever been established

There's no log for this kind of information - and for a good reason: it can hurt the privacy and anonymity of Tor. You can - technically - poll Tor regulary through Stem and keep the log for yourself, ...
user avatar
  • 5,421
1 vote

Changing identity using Tor and Stem

Try removing this. Because once the Socket is set the controller cannot change it. from stem import Signal from stem.control import Controller with Controller.from_port(port = 9151) as controller: ...
user avatar
  • 153
1 vote

Using Tor to make HTTPS requests in Python

Here are your pyCURL and a howto UPDATE: Copy-pasting by request - copyright to code to sources mentioned upstrings: amnesia@amnesia: ~$ cat checkTor.py #!/usr/bin/env python import pycurl curl = ...
user avatar
  • 5,421
1 vote

Circuit failed to establish

https://gitweb.torproject.org/torspec.git/tree/tor-spec.txt#n1167 10 -- TIMEOUT (Circuit construction took too long) ... 11 -- DESTROYED (The circuit was destroyed w/o client TRUNCATE) ...
user avatar
  • 10.8k
1 vote

Tor Path Selection using Stem to choose middle node

You have to construct the entire circuit yourself, you cannot just choose the middle node alone unfortunately. To do this, you need to use the extend_circuit command in Stem's controller API.
user avatar
  • 2,209
1 vote

How to get the number of HS descriptor requests using Stem?

There is a tutorial on retrieving the number of bytes a relay has written and read here (run the code after installing stem): from stem.control import Controller with Controller.from_port(port = ...
user avatar
  • 345
1 vote
Accepted

Finding hidden services

your site onion address could be captured by relays on the TOR network, if you want to make it confidential, you should consider making the hidden service "invitation only" or "password protected"
user avatar
  • 166
1 vote

RouterStatusEntryV3 doesn't have members it should have...?

Please file a ticket with code and the descriptor that reproduces this. You're right that the RouterStatusEntryV3 class has a measured attribute. First guess is that you might have a ...
user avatar
  • 691
1 vote

How to get time node/IP first appeared on the network?

The Tor metrics portal has historic information about consensuses. You could download the archive and search through them. You don't need Stem for that unless you want to verify the consensuses. I'd ...
user avatar
  • 2,209
1 vote

Problem getting Tor exit node from a bash script

Answer to question 1 -- part 2 (but NOT question 2): OK, I finally found the ultimate tool for analyzing the tor circuit--arm. I'm really surprised and disappointed that no one here pointed to this ...
user avatar
  • 141
1 vote

Problem getting Tor exit node from a bash script

Answer to question 1, part 1 (NOT the final answer): I think I have the answer to the first half of my first question: is the address gotten by 'wget' or 'curl' the entry node? My script gives: ...
user avatar
  • 141
1 vote

Problem getting Tor exit node from a bash script

The browser and bash are using different circuits, with different exits. The stem script shows exits for all active circuits. Also, try my tweaked exit_used.py script.
user avatar
  • 2,989
1 vote
Accepted

(Stem) Multiple Exit Nodes - Changing ID not working?

I have re-written the code, as it seems my code was just awful. I'm not sure what the problem was, however, here's the update for anyone trying to do the same: assert str is not bytes from ...
user avatar
  • 71
1 vote

(Stem) Multiple Exit Nodes - Changing ID not working?

I replied on irc but maybe you had left... If you're not getting an exception then what makes you think it isn't working? Tor limits the rate at which it accepts NEWNYMs to once every ten seconds, so ...
user avatar
  • 691

Only top scored, non community-wiki answers of a minimum length are eligible