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.1.0
    • Fixes for ptprint
  • 0.0.9
    • Printing hostname on hostname resolving error
  • 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.1.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

pthost-0.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pthost-0.1.0.tar.gz
  • Upload date:
  • Size: 20.7 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.1.0.tar.gz
Algorithm Hash digest
SHA256 de1746dd88429421c9f54b14af5fbdedd36c17c1f08e5c234b9d2204d17a394f
MD5 b346afd19ad04caffbd1bd21a7400e41
BLAKE2b-256 479da45dc09c1dfa01b04048a5f89d5621c2d4de958f76c7c0b0929b834d2c7f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pthost-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8cad593a6c3d73893d311bae796e8af5d404b6cc75e65536baf0547c3b65524
MD5 1bdb344ff4dc139a5d7c8d4a75223f65
BLAKE2b-256 4071aab9b04f260362fab43b6479657b798839b661a22d0094d690d9ced78e94

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