Questions tagged [stem]

Stem is a Python controller library for Tor.

Stem is a Python controller library that allows applications to interact with Tor (https://www.torproject.org/).

For tutorials and API documentation see stem’s homepage.

Quick Start

To install you can either use…

pip install stem

… or install from the source tarball. Stem supports both the python 2.x and 3.x series. To use its python3 counterpart you simply need to install using that version of python.

python3 setup.py install

After that, give some tutorials a try! For questions or to discuss project ideas we’re available on irc and the tor-dev@ email list.

96 questions
13
votes
1 answer

Elasticsearch match with stemming

How do I do a search for a stemmed match? I.e. at the moment I have many documents that contain the word "skateboard" in the item_title field, but only 3 documents that contain the word "skateboards". Because of this, when I do the following…
user1950164
7
votes
4 answers

Tor failing to run with Failed to bind one of the listener ports

When I run the [example][1] from the stem documentation i get the error: OSError: Process terminated: Failed to bind one of the listener ports. The exact code that I am running is below: import socks import socket import stem.process import…
Preston
  • 4,628
  • 3
  • 33
  • 58
6
votes
3 answers

"Error while receiving a control message (SocketClosed): empty socket content" in Tor's stem controller

I'm working on a scraper which uses Tor, of which a simplified version is in this example project: https://github.com/khpeek/scraper-compose. The project has the following (simplified) structure: . ├── docker-compose.yml ├── privoxy │   ├──…
Kurt Peek
  • 34,968
  • 53
  • 191
  • 361
5
votes
2 answers

How to connect to Tor control port (9051) from a remote host?

I'm trying to connect to control port (9051) of tor from a remote machine using stem python library. dum.py from stem import Signal from stem.control import Controller def set_new_ip(): """Change IP using TOR""" with…
jaggi
  • 332
  • 1
  • 4
  • 16
5
votes
2 answers

Figure object have no attribute set_title

I have used stem_graphic to plot a stem and leaf plot and saved it to pdf but when trying to enter title its giving error: Figure object have no attribute set_title. ax, b=stem_graphic(mileage['disp']) ax.set_title("Vicky") This is the…
Vicky Choudhary
  • 51
  • 1
  • 1
  • 2
5
votes
1 answer

Stem is giving the "Unable to connect to port 9051" error

I tried this example: import getpass import sys import stem import stem.connection from stem.control import Controller if __name__ == '__main__': try: controller = Controller.from_port() except stem.SocketError as exc: print("Unable…
QPTR
  • 1,456
  • 7
  • 22
  • 41
5
votes
2 answers

Tor Stem - To Russia With Love Connection Issues

I am trying to get the To Russia With Love tutoial from the Stem project working. from io import StringIO import socket import urllib3 import time import socks # SocksiPy module import stem.process from stem.util import term SOCKS_PORT =…
Steve-O
  • 327
  • 1
  • 4
  • 9
4
votes
1 answer

Is it possible to speed up the changing of IP addresses when using theStem package in Python via Tor?

I am currently using the following set-up to change my ip address in Mac OS X: from stem import Signal from stem.control import Controller with Controller.from_port(port = 9051) as controller: controller.authenticate() …
user321627
  • 1,916
  • 1
  • 11
  • 31
4
votes
2 answers

Getting Tor ControlPort to work

I have installed Tor to run as a service on my windows machine and I am trying to make requests in python through the Stem package. In my torrc file I have specified ControlPort as 9051 and set a HashedControlPassword. When I run netstat, I see that…
Einstein
  • 371
  • 4
  • 12
3
votes
1 answer

Authenticating a Controller with a Tor subprocess using Stem

I am trying to launch a new tor process (no tor processes currently running on the system) using a 'custom' config by using stems launch_tor_with_config. I wrote a function that will successfully generate and capture a new hashed password. I then…
s4w3d0ff
  • 801
  • 9
  • 22
2
votes
0 answers

How to step by step build the circuit in TOR

I have this piece of code which is a simple code to create and/or extend a circuit in TOR using stem. import getpass import sys import argparse import stem import stem.connection from stem.control import Controller if __name__ == '__main__': …
Ehsan
  • 631
  • 2
  • 6
  • 16
2
votes
1 answer

How to control stem markers size in matplotlib?

In How to make thicker stem lines in matplolib there is a description of how to control the width of stem lines. But how to control the size of the stem markers?
jason
  • 71
  • 4
2
votes
0 answers

How to make new identity with TOR and Stem and python? exact like (tor browser) new identity

I can't understand the differance between new identity from Tor browser or python? Python: I make request to call website from python with tor but website have limit reached and required reCAPTCHA so I make new identity to reset all informations to…
Mahmoud Gad
  • 320
  • 2
  • 10
2
votes
2 answers

Type Error - stem() missing 1 required positional argument : 'word'

I am working on a script to extract relevant tags from the text file which i converted from a URL. One part of the script is giving me error when i apply stemmer, the code is as below def __call__(self, tag): ''' @param tag: the tag to be…
2
votes
1 answer

python nltk -- stemming list of sentences/phrases

I have bunch of sentences in a list and I wanted to use nltk library to stem it. I am able to stem one sentence at a time, however I am having issues stemming sentences from a list and joining them back together. Is there a step I am missing? Quite…
sharp
  • 1,802
  • 7
  • 31
  • 59
1
2 3 4 5 6 7