Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [stem]

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

0
votes
0answers
8 views

implementing tor stream isolation

I want to implement tor stream isolation using stem library. what approach is suitable for distinguishing between vast variety of streams that come to tor, by a socks user/pass basis. i need to be ...
0
votes
0answers
11 views

Use Microdescriptors when using bridge

When I run tor with a simple config without specifying any bridge, it would download and use micro version of descriptors. but in the case that i specify to use bridge, (meek or obfs4) it desperately ...
1
vote
1answer
50 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', '...
0
votes
0answers
40 views

STEM issue :Instance of 'Enum' has no 'NEWNYM' member

Hello everybody i wrote so basic switching code but it gives error. def switchIP(): with Controller.from_port(port=9151) as controller: controller.authenticate() controller.signal(Signal....
1
vote
0answers
22 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?
0
votes
0answers
54 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 ...
0
votes
1answer
446 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:"...
1
vote
1answer
227 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 ...
0
votes
1answer
86 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 :)
1
vote
1answer
227 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 ...
0
votes
1answer
3k 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 ...
3
votes
1answer
807 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 ...
3
votes
2answers
590 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 ...
1
vote
1answer
364 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?
2
votes
1answer
394 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....
0
votes
0answers
160 views

stem.SocketClosed when connecting to control port

I am unable to use stem. Running the stem script to list circuits (link), I get the following error: # python circuit.py Traceback (most recent call last): File "circuit.py", line 7, in <module&...
0
votes
0answers
38 views

How to sustitue tor browser functions “create a new tor circuit for this site” with a stem script [duplicate]

How can I substitue the functions create a new tor circuit for this site used in tor browser by a stem script (or controller commands) Thank you for your valuable answer.
2
votes
1answer
856 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 ...
0
votes
1answer
318 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 ...
2
votes
1answer
299 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(...
0
votes
1answer
56 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 ...
2
votes
0answers
246 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 ...
4
votes
1answer
2k 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....
0
votes
1answer
167 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 ...
0
votes
0answers
233 views

Connecting to Tor via python stuck at 5%

I have a big problem, I am trying to connect to Tor using Python, but when it does it remains still at 5% that would be really great if you could help me. Here is my output Mar 20 23:24:04.000 [...
2
votes
2answers
298 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 ...
0
votes
1answer
190 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, ...
0
votes
1answer
223 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 ...
1
vote
1answer
158 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 ...
1
vote
1answer
131 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 ...
0
votes
1answer
64 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 ...
3
votes
2answers
1k 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 ...
3
votes
1answer
542 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 ...
3
votes
1answer
120 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 ...
2
votes
1answer
184 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 ...
2
votes
4answers
2k 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 ...
1
vote
1answer
449 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 ...
2
votes
2answers
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 ...
1
vote
2answers
1k 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 ...
2
votes
1answer
323 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....