Skip to main content

penterepTools

PTMETHODS - HTTP Methods Testing Tool

  • Script retrieves methods offered by server from OPTIONS request
  • Script sends GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD, TRACE, DEBUG, FOO headers and returns server response
  • Script tests CONNECT method by connecting to URL at ports 80, 443
  • Script tests if domain can be used as a proxy

Installation

pip install ptmethods

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

Optimally use this script against homepage, any image and sources protected by HTTP authentication

ptmethods -u https://www.example.com/
ptmethods -u https://www.example.com/ -r
ptmethods -u https://www.example.com/index.php -sr -sh
ptmethods -u https://www.example.com/index.php -c PHPSESSID=abcdef
ptmethods -f urlList.txt

Options

-u   --url                  <url>           Test specified URL
-f   --file                 <file>          Load URLs from file
-sh  --show-headers                         Show response headers
-sr  --show-response                        Show response text
-T   --timeout                              Set timeout (default 10)
-p   --proxy                <proxy>         Set proxy (e.g. http://127.0.0.1:8080)
-ua  --user-agent           <ua>            Set User-Agent header
-c   --cookie               <cookie>        Set cookie
-H   --headers              <header:value>  Set custom header(s)
-r   --redirects                            Follow redirects (default False)
-c   --cache                                Cache requests (load from tmp in future)
-b   --check-basic-methods                  Skip creating JSON nodes (used with --json option)
-v   --version                              Show script version and exit
-h   --help                                 Show this help message and exit
-j   --json                                 Output in JSON format

Dependencies

ptlibs

License

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

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

ptmethods 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 ptmethods. 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 ptmethods 1.0.12

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

Source distribution (sdist)

Source distribution for ptmethods 1.0.12
File Size Uploaded
ptmethods-1.0.12.tar.gz 21.7 kB Details

Built distribution (wheel)

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

Total release size: 43.6 kB

Release files / ptmethods-1.0.12.tar.gz

Download URL ptmethods-1.0.12.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
37732b208ed85eb3ae2e1daf14fb3c1de117bbafc7044f5f0557bedbaaffde14
BLAKE2b-256 checksum
How to use checksums
02add1f008627d2f6b605bb86c7ec33230c9d058b058147d0ef53147a59ec94c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / ptmethods-1.0.12-py3-none-any.whl

Download URL ptmethods-1.0.12-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4be34cf0e884c68892802bf6ad0b812079e6e26d6e9ee6cce10f0379d214808b
BLAKE2b-256 checksum
How to use checksums
db6d0c66e20538af242480bcc7ded9d8e4c0eea15818640d69ff13b08d913688
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.12 This release

2 release files

1.0.11

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

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

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