Skip to main content

penterepTools

PTACCOUNT

Testing tool for web application account/login security.

Installation

pip install ptaccount

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

ptaccount --login-file login_workflow.json --login bob --password Secret123
ptaccount --login-file login_workflow.json --login bob --password Secret123 -ts LGENUM -wl logins.txt

The login request is described by --login-file, a JSON array of steps (a file path, or the JSON itself base64-encoded). Each step sends a raw HTTP request - with {{login}}/{{password}} (and any value extracted by an earlier step) substituted in - and pulls values out of the response via named regexes; a plain match-only pattern acts as a presence check. A workflow with more than one step lets you describe a CSRF-token fetch, a 2FA step, etc. before the request that actually submits the credentials.

A single-request login:

[
  {
    "action": "send_request",
    "schema": "https",
    "content": "POST /user/login.php HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nlogin={{login}}&heslo={{password}}",
    "regex": {
      "sid": "PHPSESSID=([^;]+)",
      "fail": "Přihlášení se nezdařilo"
    }
  }
]

A login preceded by a CSRF-token fetch:

[
  {
    "action": "send_request",
    "schema": "https",
    "content": "GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n",
    "regex": {"csrf": "csrftoken=([^;]+)"}
  },
  {
    "action": "send_request",
    "schema": "https",
    "content": "POST /user/login.php HTTP/1.1\r\nHost: www.example.com\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\nlogin={{login}}&heslo={{password}}&csrftoken={{csrf}}",
    "regex": {
      "sid": "PHPSESSID=([^;]+)",
      "fail": "Přihlášení se nezdařilo"
    }
  }
]

The last step's regex must extract a variable named success or fail for LGPWCASE, LGREFLEXPW, LGSESSFIX and LGMETHODS, so ptaccount can tell a successful login from a failed one.

--register-file takes the same shape for a future registration-testing workflow; no test uses it yet.

Options

        --login-file        <file|base64>     JSON workflow describing how to submit the login request (required)
        --register-file     <file|base64>     JSON workflow describing how to submit a registration request
   -ts  --tests             <test>            Specify one or more tests to perform:
                             LGENUM            Test for login user enumeration
                             LGPWCASE          Test login password case sensitivity
                             LGREFLEXPW        Test whether login reflects submitted password

   -wl  --wordlist-login    <file>            Login wordlist file
   -wp  --wordlist-passwords <file>           Password wordlist file
        --login             <login>           Known-valid login
        --password          <password>        Known-valid password for --login
        --invalid-login     <login>           A login known not to exist (default: random)
        --invalid-password  <password>        A wrong password to use where a real one isn't needed (default: random)
   -p   --proxy             <proxy>           Set proxy (e.g. http://127.0.0.1:8080)
   -T   --timeout                             Set timeout (default 10)
   -t   --threads           <threads>         Set thread count for LGENUM wordlist mode (default 10)
   -r   --redirects                           Follow redirects (default False)
   -C   --cache                               Cache HTTP communication
   -vv  --verbose                             Enable verbose mode
   -v   --version                             Show script version and exit
   -h   --help                                Show this help message and exit
   -j   --json                                Output in JSON format

Dependencies

ptlibs
scipy

License

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

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

ptaccount 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 ptaccount. 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 ptaccount 0.0.5

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

Source distribution (sdist)

Source distribution for ptaccount 0.0.5
File Size Uploaded Provenance Actions
ptaccount-0.0.5.tar.gz 38.1 kB Without provenance Details for ptaccount-0.0.5.tar.gz

Built distribution (wheel)

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

Total release size: 84.1 kB

Release files / ptaccount-0.0.5.tar.gz

Download URL ptaccount-0.0.5.tar.gz
Size 38.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7dec8124a2a34e2c823e6444dea5359bd06cf548e9c1db3c3c71f5846ab139be
BLAKE2b-256 checksum
How to use checksums
35ff2b0eb17a838db5cfaea6560233c9fc68b968df371a36fa29b8ab7f1817ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / ptaccount-0.0.5-py3-none-any.whl

Download URL ptaccount-0.0.5-py3-none-any.whl
Size 46.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c6ce3b88b28a6d3ae2657dfbc082e0d4835e3912dbdbf80fa86b05612cd63884
BLAKE2b-256 checksum
How to use checksums
fa70dfbcf779b047c282fca02d3f431125ab00f8e17c28b2e630bbb1b8286cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for ptaccount 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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