Skip to main content

penterepTools

PTHOST - Default vhost testing tool

Installation

pip install pthost

Adding to PATH

If you're unable to invoke the script from your terminal, it's likely because it's not included in your PATH. You can resolve this issue by executing the following commands, depending on the shell you're using:

For Bash Users

echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.bashrc
source ~/.bashrc

For ZSH Users

echo "export PATH=\"`python3 -m site --user-base`/bin:\$PATH\"" >> ~/.zshrc
source ~/.zshrc

Usage examples

pthost -d https://www.example.com/
pthost -d www.example.com

Options:

   -d   --domain      <domain>                      Test Domain
   -t   --test        <test-types>                  Specify tests to perform (default all)
                       default-vhost                Test Default vhost
                       open-redirect                Test Open Redirect
                       crlf                         Test CRLF injection
                       host-injection               Test Host injection
                       redir-to-https               Test HTTP to HTTPS redirects
                       seo-fragmentation            Test SEO fragmentation
                       http-versions                Test HTTP protocol versions (1.0, 1.1, 2.0)
                       xss                          Test Cross Site Scripting
                       subdomain-reflection-www     Test Subdomain reflection (with www)
                       subdomain-reflection-no-www  Test Subdomain reflection (without www)

   -H   --headers     <header:value>                Set custom headers
   -T   --timeout     <timeout>                     Set timeout (default 7s)
   -ua  --user-agent  <user-agent>                  Set user agent
   -c   --cookie      <cookie=value>                Set cookie(s)
   -p   --proxy       <proxy>                       Set proxy (e.g. http://127.0.0.1:8080)
   -P   --protocol    <protocol>                    Set protocol to test (HTTP, HTTPS), default both
   -C   --cache                                     Cache requests (load from tmp in future)
   -v   --version                                   Show script version and exit
   -h   --help                                      Show this help message and exit
   -j   --json                                      Output in JSON format

Dependencies

ptlibs
validators
tldextract
bs4

License

Copyright (c) 2025 Penterep Security s.r.o.

pthost is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

pthost is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with pthost. If not, see https://www.gnu.org/licenses/.

Warning

You are only allowed to run the tool against the websites which you have been given permission to pentest. We do not accept any responsibility for any damage/harm that this application causes to your computer, or your network. Penterep is not responsible for any illegal or malicious use of this code. Be Ethical!

Metadata

Release files for pthost 1.0.17

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

Source distribution (sdist)

Source distribution for pthost 1.0.17
File Size Uploaded
pthost-1.0.17.tar.gz 25.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pthost 1.0.17
File Interpreter ABI Platform
pthost-1.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 50.3 kB

Release files / pthost-1.0.17.tar.gz

Download URL pthost-1.0.17.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
37cb25c272483625b207aa3c5bb17fe86a70066330572bc67a38f5369c6ab35f
BLAKE2b-256 checksum
How to use checksums
fa28ff0b4e7fb288a68e16f04395cd8e3824952485c2a9b6fa98329251527819
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / pthost-1.0.17-py3-none-any.whl

Download URL pthost-1.0.17-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7fef3edcf451ecd786c7ea61152ae9f8d8bb16126cb902e1a24e655b3d3cecba
BLAKE2b-256 checksum
How to use checksums
2e0a06de653ec6258382acb02593f715870c0309deaa345bfff99549e6cc55e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

1.0.17 This release

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

0.0.8

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