Skip to main content

Turbo Intruder wrapper for Python

Project description

turbo-http 🚀

Build Status Python Version License: Apache-2.0

turbo-http is an asynchronous Python requests-like wrapper for PortSwigger's Turbo Intruder. Unleash the power of Turbo Intruder's lightning-fast HTTP request engine directly from your Python scripts. Perfect for cybersecurity tasks, mass API requests, and web scraping at scale!

Table of Contents

Installation

Download and install the latest released version from PyPI:

pip install turbo-http

Requirements

Quick Start

Here's a simple example to get you started:

from turbo_http import TurboClient

client = TurboClient(url='https://example.net')
response = await client.get('/endpoint/example', params={'key': 'foo', 'page': 'bar'})

response.url
"https://example.net/endpoint/example?key=foo&page=bar"

response.status_code
"200"

response.headers
"{'Content-Type': 'application/json; charset=utf-8', 'Content-Length': 'XX', 'Connection': 'keep-alive'}"

POST Requests:

from turbo_http import TurboClient

client = TurboClient(url='https://fakestoreapi.com')
post_data = {
    'title': 'example product',
    'price': 14.4,
    'description': 'example desc'
}
response = await client.post('/products', json=post_data)

Performance

Results are completely dependent on the target server, engine configuration, and network conditions. The following are only some basic examples to give an idea of the general speed. Turbo Intruder's author mentions 30,000 RPS being the highest they were able to achieve.

# THREADED Engine (default) 100 requests (116 requests per second)

with TurboClient(url='https://httpbin.org/') as client:
    tasks = []
    for i in range(1, 100):
        tasks.append(client.get(f'/get'))
    r = await asyncio.gather(*tasks)
        
Elapsed time: 0.8579223155975342 seconds.
# THREADED Engine (default) 1,000 requests (371 requests per second)

with TurboClient(url='https://httpbin.org/') as client:
    tasks = []
    for i in range(1, 1000):
        tasks.append(client.get(f'/get'))
    r = await asyncio.gather(*tasks)
        
Elapsed time: 2.6971070766448975 seconds.
# HTTP2 Engine 1,000 requests (760 requests per second)

with TurboClient(url='https://httpbin.org/', engine=Engine.HTTP2) as client:
    tasks = []
    for i in range(1, 1000):
        tasks.append(client.get(f'/get'))
    r = await asyncio.gather(*tasks)
        
Elapsed time: 1.3151829242706299 seconds.
# HTTP2 Engine 10,000 requests (3,367 requests per second)

with TurboClient(url='https://httpbin.org/', engine=Engine.HTTP2) as client:
    tasks = []
    for i in range(1, 10000):
        tasks.append(client.get(f'/get'))
    r = await asyncio.gather(*tasks)
        
Elapsed time: 2.9748992919921875 seconds.

Acknowledgments

turbo-http is made possible thanks to the incredible work done by the original authors of Turbo Intruder. This library is merely a humble wrapper, designed to bring the capabilities of Turbo Intruder into the hands of Python developers without the need to navigate Burp Suite. We extend our deepest gratitude and encourage all users to explore the fantastic tools offered by PortSwigger.

License

turbo-http is licensed under the Apache-2.0 License. However, it's important to note that this library is built upon the hard work of others, so please use responsibly and always give credit where credit is due.

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

turbo-http-0.1.2.tar.gz (38.1 MB view details)

Uploaded Source

Built Distribution

turbo_http-0.1.2-py3-none-any.whl (38.1 MB view details)

Uploaded Python 3

File details

Details for the file turbo-http-0.1.2.tar.gz.

File metadata

  • Download URL: turbo-http-0.1.2.tar.gz
  • Upload date:
  • Size: 38.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for turbo-http-0.1.2.tar.gz
Algorithm Hash digest
SHA256 468fc89725568ed4eb7cd76cd78bec85e0c039dd5403969bc2935ed3d1046494
MD5 8be8314b1cfccfcaf1ee570b65c6f1d2
BLAKE2b-256 a596600f08082267edba9b45b4726a53da9647205a8c5ef75247099f58ea1647

See more details on using hashes here.

File details

Details for the file turbo_http-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: turbo_http-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 38.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for turbo_http-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e844562895a51aff4efb349129b14a57fb7c12b5e68916519dfc5294e8db8cf
MD5 503b643da2ea8859cf7e3a6db6584068
BLAKE2b-256 018be690b1c75b7968f81b9a54f103fca2a43ff94a3da8843bdbec28875f99ef

See more details on using hashes here.

Supported by

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