Skip to main content

PyMultitor - Never Stop Even If Your IP Dropped.

Project description

PyMultiTor

PyPI version Downloads PyPI - Python Version

Python Multi Threaded Tor Proxy,
Did you ever want to be at two different places at the same time?
When I asked myself this question, I actually started developing this solution in my mind.
While performing penetration tests there are often problems caused by security devices that block the "attacking" IP.
This really annoyed me, so I wrote a script to supply a solution for this problem.
With a large number of IP addresses performing the attacks, better results are guaranteed - especially when attempting attacks to bypass Web Application Firewalls, Brute-Force type attacks and many more.

[Blackhat Asia] https://www.blackhat.com/asia-17/arsenal.html#pymultitor
[Owasp-IL Presentation] https://www.owasp.org/images/3/3d/OWASPIL-2016-02-02_PyMultiTor_TomerZait.pdf
[DigitalWhisper Article (Hebrew)] http://www.digitalwhisper.co.il/files/Zines/0x2E/DW46-3-PyMultitor.pdf

Logo

Installation

Prerequisites

  • Python 3.10+.
  • mitmproxy (https://mitmproxy.org/).
  • tor.
    • On Ubuntu / Kali, sudo apt install -y tor
    • On Centos, sudo yum install -y tor
    • On Fedora, sudo dnf install -y tor
    • On Windows,
      • download tor expert bundle: https://www.torproject.org/download/tor/
      • insert tor to your path environment: {tor-win32-*_path}\Tor
      • if you don't know how remember tor.exe path and use --tor-cmd argument on pymultitor (for example: pymultitor --tor-cmd "c:\Pentest\Web\tor-win32-0.2.9.9\Tor\tor.exe")
    • On MacOS, brew install tor

From pip

pip3 install pymultitor

From Docker

docker pull realgam3/pymultitor

From Source

git clone https://github.com/realgam3/pymultitor.git
cd pymultitor

# Install python dependencies.
# Depending on your setup, one or both of these may require sudo.
pip3 install -r requirements.txt
python3 setup.py install

# Confirm that everything works
pymultitor --help

Bug reports on installation issues are welcome!

Usage

Basic Usage

  1. Run pymultitor --on-string "Your IP Address Blocked".
  2. On your script use proxy (http://127.0.0.1:8080).
    When the string Your IP Address Blocked will present in the response content, you will exit from another IP address.

Docker Usage

  1. Run docker run --rm -p 8080:8080 realgam3/pymultitor --on-string "Your IP Address Blocked".
  2. On your script use proxy (http://127.0.0.1:8080).
    When the string Your IP Address Blocked will present in the response content, you will exit from another IP address.

Command Line Arguments

pymultitor --help
usage: pymultitor [-h] [-v] [-lh LISTEN_HOST] [-lp LISTEN_PORT] [-s] [-a AUTH] [-i] [-d] [-p PROCESSES] [-c CMD] [-e CONFIG] [-t TIMEOUT] [-r TRIES] [--on-count ON_COUNT] [--on-string ON_STRING] [--on-regex ON_REGEX] [--on-rst] [--on-status-code ON_STATUS_CODE]

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -lh LISTEN_HOST, --host LISTEN_HOST
                        proxy listen host. (default: 127.0.0.1)
  -lp LISTEN_PORT, --port LISTEN_PORT
                        proxy listen port (default: 8080)
  -s, --socks           use as socks proxy (not http proxy) (default: False)
  -a AUTH, --auth AUTH  set proxy authentication (format: 'username:pass') (default: )
  -i, --insecure        insecure ssl (default: False)
  -d, --debug           Debug Log. (default: False)
  -p PROCESSES, --tor-processes PROCESSES
                        number of tor processes in the cycle (default: 2)
  -c CMD, --tor-cmd CMD
                        tor cmd (executable path + arguments) (default: tor)
  -e CONFIG, --tor-config CONFIG
                        tor extended json configuration (default: {})
  -t TIMEOUT, --tor-timeout TIMEOUT
                        number of seconds before our attempt to start a tor instance timed out (default: 90)
  -r TRIES, --tor-tries TRIES
                        number tries to start a tor instance before it fails (default: 5)
  --on-count ON_COUNT   change ip every x requests (resources also counted) (default: 0)
  --on-string ON_STRING
                        change ip when string found in the response content (default: )
  --on-regex ON_REGEX   change ip when regex found in The response content (default: )
  --on-rst              change ip when connection closed with tcp rst (default: False)
  --on-status-code ON_STATUS_CODE
                        change ip when a specific status code returned (default: 0)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyMultitor-4.0.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

PyMultitor-4.0.0-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file PyMultitor-4.0.0.tar.gz.

File metadata

  • Download URL: PyMultitor-4.0.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for PyMultitor-4.0.0.tar.gz
Algorithm Hash digest
SHA256 7d87ee9230911b323d9313f6482c13911c3c2f480e0c76750242beabcc3523ef
MD5 b0a9c7497d0c2b47b99995a2a4a33c87
BLAKE2b-256 75fbadc9e0ae38ab1bbbc13f6b4c2e991a14372091f51a637a6342d4430bf377

See more details on using hashes here.

File details

Details for the file PyMultitor-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: PyMultitor-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for PyMultitor-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45d11a25cced2c7545cc5739f7b5b19bb5bca949c84c4a0eade7e2263d385efb
MD5 69c7a9b83600ec856d357f5c21aa2d1a
BLAKE2b-256 0078ce69646e3e90ef8b1554ef5461e911e87614f56541309880261fed6cdda2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page