Skip to main content

http-tarpit

Web-server which produces infinite chunked-encoded responses


:heart: :heart: :heart:

You can say thanks to the author by donations to these wallets:

  • ETH: 0xB71250010e8beC90C5f9ddF408251eBA9dD7320e
  • BTC:
    • Legacy: 1N89PRvG1CSsUk9sxKwBwudN6TjTPQ1N8a
    • Segwit: bc1qc0hcyxc000qf0ketv4r44ld7dlgmmu73rtlntw

Requirements

  • Python 3.5.3+
  • aiohttp 3.4.4+

Installation

Standard Python package installation. This package is available on PyPI:

pip3 install http-tarpit

Docker

Run following command to pull image and print options help:

docker run -it yarmak/http-tarpit --help

Use following command with required options to run daemon in background (example):

docker run -dit \
    -p 8080:8080 \
    --restart unless-stopped \
    --name http-tarpit \
    yarmak/http-tarpit -m null

TLS example:

docker run -dit \
    -p 8443:8080 \
    -v /etc/letsencrypt:/srv/certs:ro \
    --restart unless-stopped \
    --name http-tarpit \
    yarmak/http-tarpit \
    -c /srv/certs/live/example.com/fullchain.pem \
    -k /srv/certs/live/example.com/privkey.pem

Usage

Synopsis:

$ http-tarpit --help
usage: http-tarpit [-h] [--disable-uvloop] [-v {debug,info,warn,error,fatal}]
                   [-m {clock,newline,urandom,null,slow_newline}]
                   [-a BIND_ADDRESS] [-p BIND_PORT] [-c CERT] [-k KEY]

Web-server which produces infinite chunked-encoded responses

optional arguments:
  -h, --help            show this help message and exit
  --disable-uvloop      do not use uvloop even if it is available (default:
                        False)
  -v {debug,info,warn,error,fatal}, --verbosity {debug,info,warn,error,fatal}
                        logging verbosity (default: info)
  -m {clock,newline,urandom,null,slow_newline}, --mode {clock,newline,urandom,null,slow_newline}
                        operation mode (default: clock)

listen options:
  -a BIND_ADDRESS, --bind-address BIND_ADDRESS
                        bind address (default: 0.0.0.0)
  -p BIND_PORT, --bind-port BIND_PORT
                        bind port (default: 8080)

TLS options:
  -c CERT, --cert CERT  enable TLS and use certificate (default: None)
  -k KEY, --key KEY     key for TLS certificate (default: None)

Modes of operation

  • clock - feed client with current time string every second
  • newline - feed client with newlines as fast as possible
  • urandom - feed client with random bytes as fast as possible
  • null - feed client with zero bytes as fast as possible
  • slow_newline - feed client with newline character every second

Metadata

Release files for http-tarpit 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for http-tarpit 0.1.2
File Size Uploaded
http_tarpit-0.1.2.tar.gz 6.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for http-tarpit 0.1.2
File Interpreter ABI Platform
http_tarpit-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / http_tarpit-0.1.2.tar.gz

Download URL http_tarpit-0.1.2.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a1018c2db032c3ade7a0e78d5f568f4b8bf93a550e9aab16d384d38391ffb48b
BLAKE2b-256 checksum
How to use checksums
28848c74689b1304c00f8b864300b5e982f049e9e1ff6e9633f8ddbf7a2ff8e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4

Release files / http_tarpit-0.1.2-py3-none-any.whl

Download URL http_tarpit-0.1.2-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97f869f014bdd575688a63f7e0fdca14791a6f60dde4145f3ea813da587de0cd
BLAKE2b-256 checksum
How to use checksums
ab4104b6728fcd271668dd3c65aa6c7221c7ccbc4cc0ea486d846c22376e5370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.4

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page