Simple package to make requests throughout Tor with circuit renewal.

Related tags

MiscellaneousAutoTor
Overview

AutoTor

Contributors Forks Stars Issues MIT License

Table of Contents
  1. About the Project
  2. Getting Started
  3. Contributing

About the Project

Simple package to make requests throughout Tor in an automated way, with circuit renewal and randomised user-agents. It can be used to easily navigate in an anonymus way or to get information from webs. At the moment, AutoTor is not OS-agnostic as it is tailored to Windows.

Contents

The most important source code elements in the project are outlined and described as follows:

  • main.py: Implements an example of how the library should be used.
  • AutoTor module:
    • autotor_base.py: Implements a class that takes care of all the logic to automate Tor download, Tor configuration, Tor initialisation, getting request sessions, Tor circuit renewal and releasing Tor resources.
    • autotor_ip.py: Implements an example class to override the request function that actually takes care of the requests. In this case, the function tries to get the IP in use by Tor.

Back to top

Dependencies

Among others, the project has been built around the following Python libraries:

Back to top

Getting Started

Installation

Option 1 - setup.py

To install with pip by using the setup.py, one should just follow two steps:

  1. Clone the project:
  git clone https://github.com/salvaba94/AutoTor.git
  1. Run the following command to install the dependencies and AutoTor:
  pip install .

Back to top

Option 2 - PyPI

Installing AutoTor from PyPI is the simplest. It only requires the following command:

  pip install autotor

Back to top

Coding

Create your class

The main class of the package is TorRequests. It is a class with an abstract method request that should be implemented in any derived class to customise the request as desired by the user. Below is the metacode for a sample implementation

from autotor import TorRequests

class MyClass(TorRequests):

    # Override the initialisation function (if needed)
    def __init__(self, tor_root = "..", another_arg = 5):
        # Initialise superclass
        super(MyClass, self).__init__(tor_root = tor_root)
        # Initialise other parameters
        self.another_arg = another_arg

    # Override the request function and implement custom functionality
    def request(self):
        
        # Get Tor session
        session = self.get_tor_session()
        # Renew Tor circuit
        self.renew_tor_ip()

        # Use the session to get information
        ...

Note: In order to make the requests with another IP and user-agent just get another session and call the renew method. It is also recommended to randomise the waiting time between requests.

Back to top

Usage

Once one has implemented the request method in the derived class, it can be used within a with statement. Any opened resources will be automatically cleared upon exiting the statement.

# Use request within a with statement
with MyClass(tor_root = ".", another_arg = 20) as tor:
    tor.request()

Back to top

Contributing

Any contributions are greatly appreciated. If you have suggestions that would make the project any better, fork the repository and create a pull request or simply open an issue. If you decide to follow the first procedure, here is a reminder of the steps:

  1. Fork the project.
  2. Create your branch:
  git checkout -b branchname
  1. Commit your changes:
  git commit -m "Add some amazing feature"
  1. Push to the branch:
  git push origin branchname
  1. Open a pull request.

Back to top

If you like the project and/or any of its contents results useful to you, don't forget to give it a star in GitHub! It means a lot to me .

You might also like...
Python-Kite: Simple python code to make kite pattern
Python-Kite: Simple python code to make kite pattern

Python-Kite Simple python code to make kite pattern. Getting Started These instr

Its a simple and fun to use application. You can make your own quizes and send the lik of the quiz to your friends.
Its a simple and fun to use application. You can make your own quizes and send the lik of the quiz to your friends.

Quiz Application Its a simple and fun to use application. You can make your own quizes and send the lik of the quiz to your friends. When they would a

A test repository to build a python package and publish the package to Artifact Registry using GCB

A test repository to build a python package and publish the package to Artifact Registry using GCB. Then have the package be a dependency in a GCF function.

B-Pkg is a simple tool in python for installing all basic package in termux

Basic-Pkg 👉🏻 Basic-Pkg 👈🏻 B-Pkg is a simple tool in python for installing all basic package in termux This is my first tool, I hope you will like

GWCelery is a simple and reliable package for annotating and orchestrating LIGO/Virgo alerts
GWCelery is a simple and reliable package for annotating and orchestrating LIGO/Virgo alerts

GWCelery is a simple and reliable package for annotating and orchestrating LIGO/Virgo alerts, built from widely used open source components.

This is a simple SV calling package for diploid assemblies.

dipdiff This is a simple SV calling package for diploid assemblies. It uses a modified version of svim-asm. The package includes its own version minim

A simple package for interacting with the 9kw.eu anti-captcha service.
A simple package for interacting with the 9kw.eu anti-captcha service.

Welcome to captcha9kw’s documentation! captcha9kw is a smallish Python package for making use of the 9kw.eu services, including solving of interactive

A collection of simple tools that proved to be needed for hadling large periodic calculations with the VASP software package.

VESTA-tools A collection of simple tools that proved to be needed for handling large periodic calculations with the VASP software package. distTotCalc

Releases(v2.0.0)
  • v2.0.0(Mar 17, 2022)

    AutoTor Release Notes

    2022/03/17 - v2.0.0

    New Features

    • Tor multi-threaded requests - Multi-threaded requests support added. This will certainly accelerate the pace at which requests can be done with different IPs and User-Agents.

    Bug Fixes

    • None

    Full Changelog: https://github.com/salvaba94/AutoTor/compare/v1.0.0...v2.0.0

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Mar 13, 2022)

    AutoTor Release Notes

    2022/03/03 - v1.0.0

    New Features

    • First version - Simple package to make requests throughout Tor in an automated way and with circuit renewal. At the moment, AutoTor is not OS-agnostic as it is tailored to Windows and it does not support parallel runs.

    Bug Fixes

    • None
    Source code(tar.gz)
    Source code(zip)
Owner
Salvador Belenguer
AI/ML Engineer | Aerospace Engineer | Certified Tensorflow Developer
Salvador Belenguer
YBlade - Import QBlade blades into Fusion 360

YBlade - Import QBlade blades into Fusion 360 Simple script for Fusion 360 that takes QBlade blade description and constructs the blade: Usage First,

Jan Mrázek 37 Sep 25, 2022
A general illumination correction method for optical microscopy.

CIDRE About CIDRE is a retrospective illumination correction method for optical microscopy. It is designed to correct collections of images by buildin

Kevin Smith 31 Sep 07, 2022
A example project's description is a high-level overview of why you’re doing a project.

A example project's description is a high-level overview of why you’re doing a project.

Nikita Matyukhin 12 Mar 23, 2022
Semester Project on Signal Processing @CS UCU 2021

Blur Detection with Haar Wavelet Transform Requirements Python3 opencv-python PyWavelets Install these using the following command: $ pip install -r r

ButynetsD 2 Oct 15, 2022
libvcs - abstraction layer for vcs, powers vcspull.

libvcs - abstraction layer for vcs, powers vcspull. Setup $ pip install libvcs Open up python: $ python # or for nice autocomplete and syntax highlig

python utilities for version control 46 Dec 14, 2022
An application to see if your Ethereum staking validator(s) are members of the current or next post-Altair sync committees.

eth_sync_committee.py Since the Altair upgrade, 512 validators are randomly chosen every 256 epochs (~27 hours) to form a sync committee. Validators i

4 Oct 27, 2022
Python package for handling and analyzing PSRFITS files

PyPulse A pure-Python package for handling and analyzing PSRFITS files. Read the documentation here. This is an alternate code base from PSRCHIVE. Req

Michael Lam 15 Nov 30, 2022
Ningyu Jia(nj2459)/Mengyin Ma(mm5937) Call Analysis group project(Group 36)

Group and Section Group 36 Section 001 name and UNI Name UNI Ningyu Jia nj2459 Mengyin Ma mm5937 code explanation Parking.py (1) Calculate the rate of

1 Dec 04, 2021
Painel simples com consulta de cep,CNPJ,placa e ip

Painel mpm Um painel simples com consultas de IP, CNPJ, CEP, PLACA, TELEFONE, CPF e NOME Início 🌐 apt update && apt upgrade -y pkg i python git pip i

8 Feb 27, 2022
This is where I learn machine learning

This is where I learn machine learning🤷‍ This means that this repo covers no specific topic of machine learning or a project - I work in here when I want to learn/try something

Wilhelm Berghammer 47 Nov 16, 2022
News-app - This is a news web app for reading news from different sources and topics

News-app - This is a news web app for reading news from different sources and topics

1 Feb 02, 2022
Projeto-menu - This project is designed to learn more about control mechanisms in Python programming

Projeto-menu - This project is designed to learn more about control mechanisms in Python programming

Henrik Ricarte 2 Mar 01, 2022
Build a grocery store management application.

python_projects_grocery_webapp In this python project, we will build a grocery store management application. It will be 3 tier application, Front end:

codebasics 54 Dec 29, 2022
Sacred is a tool to help you configure, organize, log and reproduce experiments developed at IDSIA.

Sacred Every experiment is sacred Every experiment is great If an experiment is wasted God gets quite irate Sacred is a tool to help you configure, or

IDSIA 4k Jan 02, 2023
BinCat is an innovative login system, with which the account you register will be more secure.

BinCat is an innovative login system, with which the account you register will be more secure. This project is inspired by a conventional token system.

Hipotesi 2 May 22, 2022
ELF file deserializer and serializer library

elfo ELF file deserializer and serializer library. import elfo elf = elfo.ELF.from_path('main') elf ELF( header=ELFHeader( e_ident=e

Filipe Laíns 3 Aug 23, 2021
Telegram bot to search quotes from brainyquote.com

Brainy Quote Bot @BrainQuoteBot A star ⭐ from you means a lot to us! Telegram bot to search quotes from brainyquote.com Usage Deploy to Heroku Tap on

21 Nov 24, 2022
Demo of using DataLoader to prevent out of memory

Demo of using DataLoader to prevent out of memory

3 Jun 25, 2022
because rico hates uuid's

terrible-uuid-lambda because rico hates uuid's sub 200ms response times! Try it out here: https://api.mathisvaneetvelde.com/uuid https://api.mathisvan

Mathis Van Eetvelde 2 Feb 15, 2022
calculadora financiera hecha en python

Calculadora financiera Calculadora de factores financieros basicos, puede calcular tanto factores como expresiones algebraicas en funcion de dichos fa

crudo 5 Nov 10, 2021