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
📽 Streamlit application powered by a PyScaffold project setup

streamlit-demo Streamlit application powered by a PyScaffold project setup. Work in progress: The idea of this repo is to demonstrate how to package a

PyScaffold 2 Oct 10, 2022
AutoMetamon: Simple program to play Metamon automatically

AutoMetamon: Simple program to play Metamon automatically

Ngô Văn Tuấn 2 Sep 13, 2022
A chain of stores wants a 3-month demand forecast for its 10 different stores and 50 different products.

Demand Forecasting Objective A chain store wants a machine learning project for a 3-month demand forecast for 10 different stores and 50 different pro

2 Jan 06, 2022
Blender addon that enables exporting of xmodels from blender. Great for custom asset creation for cod games

Birdman's XModel Tools For Blender Greetings everyone in the custom cod community. This blender addon should finally enable exporting of custom assets

wast 2 Jul 02, 2022
System Information Utility With Python

System-Information-Utility This is a simple utility, for the terminal, which allows you to find out information about your PC. It's very easy to run t

2 Apr 15, 2022
Packaging tools for shanty services.

parcel Packaging tools for shanty services. What? Services are docker containers deployed by shanty on a hosting appliance. Each service consists of t

0 Jan 20, 2022
Recreating my first CRUD in python, but now more professional

Recreating my first CRUD in python, but now more professional

Ricardo Deo Sipione Augusto 2 Nov 27, 2021
🌌 Economics Observatory Visualisation Repository

Economics Observatory Visualisation Repository Website | Visualisations | Data | Here you will find all the data visualisations and infographics attac

Economics Observatory 3 Dec 14, 2022
Free and open source qualitative research tool

Taguette A spin on the phrase "tag it!", Taguette is a free and open source qualitative research tool that allows users to: Import PDFs, Word Docs (.d

Remi Rampin 48 Jan 02, 2023
Este script añade la config de s4vitar a bspwm automaticamente!

Se ha testeado este script en ParrotOS, Kali y Ubuntu. Funciona para todos los sistemas operativos basados en Debian. Instalación git clone https://gi

yorkox 201 Dec 30, 2022
The best way to learn Python is by practicing examples. The repository contains examples of basic concepts of Python. You are advised to take the references from these examples and try them on your own.

90_Python_Exercises_and_Challenges The best way to learn Python is by practicing examples. This repository contains the examples on basic and advance

Milaan Parmar / Милан пармар / _米兰 帕尔马 205 Jan 06, 2023
The earliest beta version of pytgcalls on Linux x86_64 and ARM64! Use in production at your own risk!

Public beta test. Use in production at your own risk! tgcalls - a python binding for tgcalls (c++ lib by Telegram); pytgcalls - library connecting pyt

Il'ya 21 Jan 13, 2022
Med to csv - A simple way to parse MedAssociate output file in tidy data

MedAssociates to CSV file A simple way to parse MedAssociate output file in tidy

Jean-Emmanuel Longueville 5 Sep 09, 2022
The last walk-through project in code institute diploma course

Welcome Rocky.C, This is the Code Institute student template for Gitpod. We have preinstalled all of the tools you need to get started. It's perfectly

Rocky.C 1 Jan 31, 2022
You will need to install a few python packages for this one.

Features Bait support Auto repair will repair every 10 catches Anti detection (still a work in progress) but using random times and click positions Pr

12 Sep 21, 2022
Additional useful operations for Python

Pyteal Extensions Additional useful operations for Python Available Operations MulDiv64: calculate m1*m2/d with no overflow on multiplication (TEAL 3+

Ulam Labs 11 Dec 14, 2022
🏃 Python3 Solutions of All Problems in GKS 2022 (In Progress)

GoogleKickStart 2022 Python3 solutions of Google Kick Start 2022. Solution begins with * means it will get TLE in the largest data set. Total computat

kamyu 38 Dec 29, 2022
Awesome Cheatsheet

Awesome Cheatsheet List of useful cheatsheets Inspired by @sindresorhus awesome and improved by these amazing contributors. If you see a link here is

detailyang 6.5k Jan 07, 2023
Very simple encoding scheme that will encode data as a series of OwOs or UwUs.

OwO Encoder Very simple encoding scheme that will encode data as a series of OwOs or UwUs. The encoder is a simple state machine. Still needs a decode

1 Nov 15, 2021