Skip to main content

Web-server which produces infinite chunked-encoded responses

Project description

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

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

http_tarpit-0.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

http_tarpit-0.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file http_tarpit-0.1.2.tar.gz.

File metadata

  • Download URL: http_tarpit-0.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for http_tarpit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a1018c2db032c3ade7a0e78d5f568f4b8bf93a550e9aab16d384d38391ffb48b
MD5 d73d223d1865e7104a28f09c276cd35f
BLAKE2b-256 28848c74689b1304c00f8b864300b5e982f049e9e1ff6e9633f8ddbf7a2ff8e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: http_tarpit-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for http_tarpit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 97f869f014bdd575688a63f7e0fdca14791a6f60dde4145f3ea813da587de0cd
MD5 b97948ffbc268832cac43072ad038102
BLAKE2b-256 ab4104b6728fcd271668dd3c65aa6c7221c7ccbc4cc0ea486d846c22376e5370

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