Giter VIP home page Giter VIP logo

restfultor's Introduction

Summary

restfulTor.py is a Python module that allows the user to change IP addresses and make RESTful calls through the Tor network.

Inspiration

While doing a final project for CS229 Machine Learning at Stanford, my team was dealing with a large dataset. For each line in the dataset, we needed to call the sentiment analysis API at "http://text-processing.com/api/sentiment/". Due to the number of API calls being made, my computer kept on being rate limited and blocked. Therefore, I conceived the idea of sending all traffic to the API through Tor. This would allow us to ping the API until one IP is blocked, then simply switch IP addresses. The system worked perfectly, and we were able to send as much traffic as needed to the API!

How to Use

The main function of restfulTor.py contains examples of how to do the following:

  • Open Tor browser programmatically
  • Make GET, POST, PUT, and DELETE requests
  • How to change IP addresses The main function can be run using python restfulTor.py.

Prerequisites

It is necessary for the Tor browser to be open and running before any RESTful requests or IP address changes can be made. For this reason, I have included an installation of Tor in the folder labeled "Tor".

Shoutouts

A special thanks to the following:

    1. The Tor Project (https://www.torproject.org/)
    1. HttpBin, which was extremely useful for testing (https://httpbin.org/)
    1. The brave few who attempted to achieve the same functionality. It was only by reading through numerous other attempts that I was eventually able to figure out how to use Tor programmatically.

restfultor's People

Contributors

scoliann avatar

Stargazers

Saber tabatabaee yazdi avatar mohammad avatar

Watchers

James Cloos avatar mohammad avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.