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.

104 questions
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
  • 711
  • 2
  • 7
  • 21
2
votes
1 answer

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
  • 338
  • 3
  • 11
2
votes
1 answer

Matplotlib stem plot with pandas dataframe over a range of x-values

I'm pretty much a beginner working with Python so I apologize if I use the wrong terminology. I have a question regarding stem plots using matplotlib. I want to plot the frequency of change on certain positions on a object. I have this pandas…
Dr. Brynjolf
  • 53
  • 1
  • 7
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…
Abhinav Sharma
  • 45
  • 1
  • 2
  • 8
2
votes
1 answer

Python stem+requests: Not switching circut/changing IP address when using a session

Cnosider the following script tortest.py, which repeatedly switches the TOR circuit and checks if the IP address has changed: #!/usr/bin/env python2.7 # -*- coding: utf-8 -*- import json import time # pip install requests[socks] import requests #…
user1658887
  • 449
  • 4
  • 15
2
votes
2 answers

Stemming Pandas Dataframe 'float' object has no attribute 'split'

import pandas as pd from nltk.stem import PorterStemmer, WordNetLemmatizer porter_stemmer = PorterStemmer() df = pd.read_csv("last1.csv",sep=',',header=0,encoding='utf-8') df['rev'] = df['reviewContent'].apply(lambda x : filter(None,x.split("…
2
votes
1 answer

Using TOR with python on windows - Cannot find installer

I am trying to learn how to use Python with TOR. However, I cannot find anywhere TOR client for windows (equivilent to "apt-get install tor" on linux, or ORbot on android). All I find is the TOR browser, which I already have and use. I am using stem…
2
votes
0 answers

Python stem Tor - get_newnym_wait() always return 0

I'm trying to change my Tor IP address by using stem Python library. The code below works fine (I also use it for scraping), but the get_newnym_wait() always return "0" such that I can't define relevant spleep time before requesting a new IP. See…
Bob
  • 43
  • 1
  • 1
  • 3
2
votes
1 answer

Stem controller's new identity does not change tor IP

the following problem looks a lot like many related questions already on SO (I've read through them but my problem is slightly different and remains). I've written the following code in Python 3.6.1 using the stem library (tested both on macOS…
Zorgatone
  • 4,176
  • 4
  • 30
  • 47
2
votes
1 answer

How to create stem plot in R?

I want to create a stem plot in R. I do have a matlab code but do not know how to write the same code in R. The matlab code as follow x = 0:25; y = [exp(-.07*x).*cos(x);exp(.05*x).*cos(x)]'; h =…
browndynamite
  • 133
  • 1
  • 7
2
votes
1 answer

Choose Exit node of Tor Python Stem

How do we choose an exit node of a different country for a Tor controller? I am using python stem library to achieve this. If I use Signal.NEWNYM(), I am able to change exit node's identity but not necessarily its country. Any random exit node of…
surbhi
  • 387
  • 5
  • 16
2
votes
1 answer

How to specify the circuit to be used by Tor in stem.process.launch_tor_with_config

In stem.process.launch_tor_with_config How can we specify the circuit to be used by Tor?
surbhi
  • 387
  • 5
  • 16
2
votes
2 answers

How to make thicker stem lines in matplolib

I want to make thicker stem lines in python when using plt.stem. Here is my code import matplotlib.pyplot as plt import numpy as np N = 20 n = np.arange(0, 2*N, 1) x = np.exp(-n/N)*np.exp(1j * 2*np.pi/N*n) plt.stem(n,x.real) plt.show() I…
2
votes
1 answer

How to start with stem?

I'm newbie in stem (Tor framework in python). I have windows 10 64 bit with python27 installed and stem library and Tor browser. When I want to start my first code as below: import sys from stem.connection import connect if __name__ ==…
Reza
  • 243
  • 1
  • 3
  • 10
2
votes
1 answer

Running stem with tor gives "Process terminated: Timed out"

While trying to run Stem's To Russia With Love example, I am getting the following error: ~$ python practice.py Starting Tor: Traceback (most recent call last): File "practice.py", line 49, in init_msg_handler =…
QPTR
  • 1,620
  • 7
  • 26
  • 47