Skip to main content

Default vhost tester

Project description

penterepTools

PTHOST

Default vhost tester

pthost is a script for testing default vhost on target server, pthost also tests target server for CRLF injection, Host injection, and Open Redirect vulnerabilities via Host HTTP header.

Installation

pip install pthost

Add to PATH

If you cannot invoke the script in your terminal, its probably because its not in your PATH. Fix it by running commands below.

Add to path for BASH

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

Add to path for ZSH

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

Usage examples

pthost -d www.example.com

Options

   -d   --domain                        <domain>        Test Domain
   -t   --test                          <test-type>     Specify test-types (default all)
        -t is-default                                   Test Default vhost
        -t open-redirect                                Test Open Redirect
        -t crlf                                         Test CRLF injection
        -t host-injection                               Test Host injection
        -t redir-to-https                               Test HTTP to HTTPS redirects
        -t redir-to-sub                                 Test Subdomain redirects
        -t subdomain-reflection-www                     Test Subdomain reflection (with www)
        -t subdomain-reflection-no-www                  Test Subdomain reflection (without www)
   -ua  --user-agent                    <user-agent>    Set user agent
   -H   --headers                       <header:value>  Set custom headers
   -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
   -j   --json                                          Output in JSON format
   -v   --version                                       Show script version and exit
   -h   --help                                          Show this help message and exit

Dependencies

  • requests
  • tldextract
  • ptlibs

Version History

  • 0.0.8
    • Tool renamed from ptdefvhost to pthost
    • Added CRLF test
  • 0.0.7
    • Added subdomain reflection test
    • Fixed encoding issues on some sites
  • 0.0.1 - 0.0.6
    • Alpha releases

License

Copyright (c) 2020 HACKER Consulting s.r.o.

ptinsearcher 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.

ptinsearcher 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 ptinsearcher. 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!

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

pthost-0.0.8.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

pthost-0.0.8-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file pthost-0.0.8.tar.gz.

File metadata

  • Download URL: pthost-0.0.8.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.9

File hashes

Hashes for pthost-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a48dd324cc4c1e3239e2acae416ea31ce8213df6dc60c88a867d7fee5d1f185f
MD5 8c8367fd114f9147f9565ed5545342eb
BLAKE2b-256 845a9c2480a46e1236ef30b5e166eeccba559ac137f6534791e1546442482c96

See more details on using hashes here.

File details

Details for the file pthost-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: pthost-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.6.4 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.9

File hashes

Hashes for pthost-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb77b472e564358f1f776f5fb3278b4cae222bc90fc1918c88ee04ffa509cf2
MD5 afe1c49665f3a27f6c3beaefaa9657c6
BLAKE2b-256 d4f841f0b6ab583986e4df1f1c1256e0d5ff94fa57b29ca1f00442cce805b208

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