Skip to main content

Questions tagged [stem]

Stem is a controller library for Tor. It is based on Python.

Filter by
Sorted by
Tagged with
0 votes
1 answer
83 views

Circuit status details with stem

With stem I can list the active circuits and some details about them What I would like to understand is: how can I know if one of the circuits has been used (it's dirty) or not (it's clean)? This ...
Tom's user avatar
  • 1
0 votes
0 answers
292 views

How to use a specfic Tor middle node

I have a question related to Tor middle node. I already see some of the answers from here. But non of them is recent so I was thinking maybe some imporoment happen in Tor by now. I want to choose a ...
khan's user avatar
  • 1
0 votes
2 answers
132 views

Tor "stem.connection.UnreadableCookieFile" error on scheduling python script on Airflow

I am using Apache Airflow to schedule my script. If I try to run the script from the terminal. stem is able to pickup the cookie file easily but If I try to run it via Airflow, it throws this error. ...
Altair21's user avatar
  • 101
1 vote
0 answers
379 views

How to prevent torsocks timeouts from concurrent calls?

I'm running a distant HTTP server, serving a single page, used for delay measurements purposes. From my client, I'm generating multiple different custom circuits each being assigned a new upcoming ...
luruel's user avatar
  • 11
1 vote
0 answers
313 views

Python3 + Tor's stem library => Permission denied when creating new hidden service

I am trying to deploy a new hidden service using Tor's stem library for Python3, but I am always receiving errors that the service can not be created due to '[Errno 13] Permission denied' issue. I am ...
rogaloo's user avatar
  • 11
0 votes
1 answer
239 views

Reusing a Tor "dirty" circuit

I have a couple of questions related to Tor circuits. Let's say that there is a circuit that was used and marked "dirty" and has also expired (no active TCP stream). Can this circuit ever ...
Arushi Arora's user avatar
0 votes
1 answer
297 views

How do I reuse the onion address of a hidden service

I first want to generate a service and save the private key for reuse if one hasn't already been generated and saved, and if one has been generated and saved I want to be able to load it again if ...
404's user avatar
  • 1
0 votes
0 answers
359 views

SIGNAL response contained unrecognized status code: 514

I'm trying to use tor as a proxy for a few HTTP requests as described in Stealthy Crawling using Scrapy, Tor and Privoxy, but instead of privoxy, I'm using tor's built-in HTTP tunnel. This is my tor ...
Honza Javorek's user avatar
0 votes
1 answer
1k views

Cannot connect to my tcp tor hidden service in Python

I have a fully functional tor hidden service with his v3 url, created with stem and the controller class. The server is redirecting the traffic into a local tcp server running on port 5000 created ...
Gianla's user avatar
  • 1
0 votes
1 answer
485 views

Using stem with multithreading Python

I am trying to use two circuits in parallel with stem. In tor browser, two different websites use two different circuits. I am trying to get similar functionality in my python code. Here is what I am ...
Khizar Amin's user avatar
1 vote
0 answers
89 views

Tor client node ignores `set_config` from Stem

I was doing some experiments for a project on a Tor test network. I used Chutney to set up a small network and Stem to control one of the client nodes in the network. Because I made some changes on a ...
vanbastelaer's user avatar
0 votes
1 answer
239 views

Should my custom application modify torrc to authenticate itself in ControlPort?

I want to do strange thing. I write a custom application (distributed forums node) that will run on the same computer with TorBrowser and use tor process to create temporary hidden service and serve ...
kisin_pop_up's user avatar
0 votes
0 answers
115 views

Integrating Tor Browser and Python to get the same circute

This is a cross post from my StackOverFlow question(also I little edited). Ok, my question is quite straightforward: I want to use Python to make automated requests with stem (or any other library ...
Dex's user avatar
  • 1
1 vote
1 answer
247 views

displaying streams from onion service to rendezvous point

Using the Linux onioncircuits package or carml monitor, I see circuits for onions that I'm accessing (client-side circuits). I also see circuits for onions that I'm hosting, and accessing from another ...
dzgray's user avatar
  • 21
0 votes
1 answer
481 views

The problem about stem's new_circuit and extend_circuit?

I have read the document of Stem. I notice that new_circuit() and extend_circuit() can create new circuit.However,I have two problems: I can't make sure when I create a new circuit, will the old ...
YU.MO's user avatar
  • 1
2 votes
0 answers
131 views

circuit_build_no_more_hops: Bug: 2-hop circuit 0x7fd6935ce4c0 with purpose 5 has no guard state

For research, I need to create custom circuits using stem. I ran code, but a warning occurred in Tor application: [warn] circuit_build_no_more_hops: Bug: 2-hop circuit 0x7fd6935ce4c0 with purpose 5 ...
Azunyan1111's user avatar
1 vote
1 answer
280 views

using meek bridge programmatic

I am working on a tor launcher using stem.process module. my problem is that when i specify tor to use meek bridge, it stop at bootstrapping part. my config: config = { 'SocksPort': '7000', '...
pouya's user avatar
  • 31
1 vote
0 answers
153 views

What are the parameter of get_info in stem

From stem documentation, the syntax of get_info is get_info(params, default = UNDEFINED, get_bytes = False) Where can I find a list of possible GETINFO parameters params?
h595324.nwytg.com's user avatar
0 votes
1 answer
379 views

customizing tor browser bundle

I want to create a browser bundle that supports the following things: there is a standalone tor process that i launch it using the controller connection from the stem library and i manually connect ...
pouya's user avatar
  • 31
0 votes
1 answer
3k views

Stem Error:[Errno:111] [closed]

I am new to stem(not the tree stem, the proxy). I made a python script that connects to a proxy using stem. I am getting a [Errno:111] error, how do I fix it? (The error occurred even though I typed:"...
Justin Chang's user avatar
1 vote
1 answer
782 views

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

I have seen several ways using stem and socks but I could not connect to an FTP yet. #!/usr/bin/python3.5 import ftplib import os def upload(ftp, file): ext = os.path.splitext(file)[1] if ...
Marco Leslie 's user avatar
0 votes
1 answer
736 views

Can we query a Relay to get its descriptors?

Parsing the Tor Consensus gives us the IP Addresses of active relays in the Tor network. Is there a way of getting a relay's descriptors from that particular relay itself ? Thanks :)
Mithrandir's user avatar
1 vote
1 answer
1k views

Tor and stem library : non consistent error message with wrong password

I'm writing a little program trying to connect to Tor (v0.2.9.10) using the stem library (v1.5.4). I've taken inspiration from this page : https://stem.torproject.org/api/control.html For now it ...
Pierre-Alain TORET's user avatar
0 votes
1 answer
11k views

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

I started with TOR's STEM library and I am trying to make the following code work but can't figure out the reason for the error. Here's my code: import stem from stem.process import launch_tor from ...
sigmapie8's user avatar
  • 101
3 votes
1 answer
2k views

How many local concurrent Tor connections can I run?

I'm currently experimenting with Tor via the Stem python lib and using process.launch_tor_with_config() with a pool of processes, each using a different Control Port. However as I increase pool size ...
user1561108's user avatar
5 votes
1 answer
2k views

torcc file missing on Mac OS Sierra?

Trying to get Tor to renew my identity for my Python code. I'm following the STEM project guide on how to set this up. It seems that to get this properly working (for Python), I need to edit the ...
LucSpan's user avatar
  • 51
1 vote
1 answer
720 views

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

Which stem python code would you suggest to determine whether tor is operational (bootstrapped at 100%) or not?
user123456's user avatar
2 votes
1 answer
1k views

How to list all tor circuits that have ever been established

I can get the current with this stem code. #!/bin/python from stem import CircStatus from stem.control import Controller with Controller.from_port(port = 9051) as controller: controller....
user207114's user avatar
3 votes
1 answer
2k views

Changing identity using Tor and Stem

I'm following the tutorial To Russia With Love, and as part of this I want to change the identity everytime I run the code. I've looked at multiple questions and tutorials and from the looks of it my ...
April's user avatar
  • 33
0 votes
1 answer
923 views

Selecting a middle node in Tor using Stem [closed]

I'm trying to learn my way around Tor and the Stem library for a class. My understanding is that the middle node is selected by tor and is unaccessible through Stem, however as part of the class I ...
April's user avatar
  • 33
3 votes
2 answers
617 views

Cannot use get_ports() with stem modules

I am unable to use the function get_ports() with stem. It says # python get_ports.py OR [...] File "/usr/local/lib/python2.7/dist-packages/stem/socket.py", line 126, in send raise stem.SocketClosed(...
user15122's user avatar
0 votes
1 answer
106 views

What is the listener_type argument in the stem controller module?

The function get_ports(): get_ports(listener_type, default = UNDEFINED) as defined in the stem controller module description here needs a listener_type variable as argument defined on the link as ...
user avatar
2 votes
0 answers
573 views

Using Circuits in Parallel

Is there some easy method to use circuits in parallel in TOR using the STEM API. I wanted to use Website A for Circuit A and Website B for Circuit B. The problem is using threading the event listener ...
George J. Adams's user avatar
4 votes
1 answer
3k views

Using Tor to make HTTPS requests in Python

I have the following code: with Controller.from_port(port = 9151) as controller: controller.authenticate() socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127....
Mustard Tiger's user avatar
0 votes
1 answer
305 views

Circuit failed to establish

I'm trying to build my own circuits using stem: These are three different error messages I get from time to time: Circuit failed to be created: DESTROYED Circuit failed to be created: TIMEOUT Unable ...
George J. Adams's user avatar
2 votes
2 answers
1k views

Finding available bandwidth of a relay

Is there any method to get the available bandwidth of a Tor Relay. (Not the one the relay publishes itself.) Plus I wrote the following sets of code: from stem.descriptor.remote import ...
George J. Adams's user avatar
0 votes
1 answer
343 views

Tor Path Selection using Stem to choose middle node

Has anyone had luck selecting the middle node used within the path selection of tor using Stem? I am trying to set a specific set of routers (non public, so will have a different directory server, ...
computerstaat's user avatar
0 votes
1 answer
357 views

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

I'm running a Tor relay on Linux which has the HSDir flag, meaning that it can host hidden service descriptors. I've been wondering, just out of curiosity whether it is possible to get some info about ...
Ashley's user avatar
  • 11
1 vote
1 answer
256 views

Finding hidden services

There are several questions here, 1) maybe I should chop the Question to pieces? All four questions marked with numbers as before. I am considering to host file server for a company in tor. The idea ...
pekka's user avatar
  • 13
1 vote
1 answer
222 views

How do you get legit relay bandwidth ballpark figures?

I'm using STEM. I'm trying to create custom circuits based on relay information but I'm unable to get reliable relay information. RouterStatusEntryV3.measured which appears to be the heuristic I ...
Alen Browin's user avatar
0 votes
1 answer
127 views

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

AttributeError: 'RouterStatusEntryV3' object has no attribute 'measured' measured (int) -- bandwidth measured to be available by the relay, this is a unit-less heuristic generated by the Bandwidth ...
Alen Browin's user avatar
3 votes
2 answers
3k views

Stem: How to get current in-use circuit?

I am able to list the circuits, but for some reason I'm never able to quite get a circuit alone consistently, there always appears to be many of them with state BUILT. This is especially true after I ...
Alen Browin's user avatar
3 votes
1 answer
1k views

How to assign a stream to a circuit?

I have a Python script that is configured to connect to 4 different onion services (call them a, b, c, d), and return a value on a page. I'd like to ensure that I create separate circuits to connect ...
Lizbeth's user avatar
  • 1,274
3 votes
1 answer
138 views

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

I need to get the time that a Tor server or an IP address first appeared in the consensus. Is it possible to use Stem to get this kind of information? If not, how do I get the time of a server or IP ...
tor_user's user avatar
1 vote
1 answer
281 views

Interacting with Tor cloud via python/stem

I'm new to Tor. I'm interested in setting up a Tor cloud (https://cloud.torproject.org/#get_started) on ec2, which looks straight forward. However besides surfing I want to use python, likely the stem ...
user1592380's user avatar
2 votes
4 answers
3k views

Problem getting Tor exit node from a bash script

I have been trying to get the IP address of the tor exit node from a bash script. I have tried torifying the usual methods found in various posts in forums for getting one's local IP address. For ...
hmj6jmh's user avatar
  • 141
1 vote
1 answer
1k views

Setting up Tor for use with stem

I frequently use either Tor Browser or Tails. Now I would like to do something entirely different and want to use stem. The tutorials on that site all presuppose that Tor is installed separately from ...
CrimsonDark's user avatar
2 votes
2 answers
2k views

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

I'm coding something in Python (Stem.) And I've hit a wall. I'm trying to get 2 relays working simultaneously, being able to change the identity independently for each one too. And I don't think the ...
Kyron's user avatar
  • 71
1 vote
2 answers
2k views

Communicating through Tor using Python

Are there any libraries that make it easier to do networking in Python using Tor? I'd like to be able to write IRC bots/clients and possibly use other networks, so none of the HTTP libraries which ...
user3077's user avatar
2 votes
1 answer
859 views

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

Although the Stem script "exit_used.py" runs for a while, eventually it hits "Exception in thread Event Notifier" and stops. Traceback reports that the failing call is: File "/usr/local/lib/python2....
mirimir's user avatar
  • 2,997