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.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ptaccount-0.0.8.tar.gz | 53.9 kB | Without provenance | Details for ptaccount-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ptaccount-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for ptaccount-0.0.8-py3-none-any.whl |
Total release size: 122.0 kB
Release files / ptaccount-0.0.8.tar.gz
| Download URL | ptaccount-0.0.8.tar.gz |
|---|---|
| Size | 53.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17648ec9ed673b0c25cf5d3f3e509c00f275d967278d2a41adc8fc62f9e0fd1e
|
|
BLAKE2b-256 checksum How to use checksums |
6962c367efa879a490729a121590e4e59d5c90a24d30d886c4b429b23420cac0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / ptaccount-0.0.8-py3-none-any.whl
| Download URL | ptaccount-0.0.8-py3-none-any.whl |
|---|---|
| Size | 68.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4910cefc8826bdcbf354e81b311af003ecae8d1f4435e2c6a5d79011411c8cad
|
|
BLAKE2b-256 checksum How to use checksums |
9ca1a13fb63324eb149909d7f2166b9e6325dc83e2c8efaa52920ecc8ff2edc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Security for ptaccount 0.0.8
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.