Skip to main content

wafsolver

PyPI version CI

Solve AWS WAF JavaScript challenges without a browser.

Note: intended for accessing sites you are allowed to access programmatically.

Install

pip install wafsolver

Use

import requests
import wafsolver

DOMAIN = "example.com"
URL = f"https://{DOMAIN}/"

session = requests.Session()
res = session.get(URL)

if wafsolver.is_challenged(res.headers):
    token = wafsolver.solve_challenge(DOMAIN, res.text)
    session.cookies.set(wafsolver.TOKEN_COOKIE, token, domain=DOMAIN)
    res = session.get(URL)

print(res.status_code, len(res.text))

Reuse one solver when you need several tokens, or want to refresh one:

from wafsolver import WafSolver

solver = WafSolver("example.com")
token = solver.solve(challenge_html)
refreshed = solver.solve(challenge_html, existing_token=token)

Metadata

Release files for wafsolver 0.0.2

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

Source distribution (sdist)

Source distribution for wafsolver 0.0.2
File Size Uploaded Provenance Actions
wafsolver-0.0.2.tar.gz 12.3 kB Without provenance Details for wafsolver-0.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 25.1 kB

Release files / wafsolver-0.0.2.tar.gz

Download URL wafsolver-0.0.2.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
228e47d89392aedd191ea9a5c268e3e7fb5b986485f46fc3a08d8508d9eaeb53
BLAKE2b-256 checksum
How to use checksums
0faf951d2b9c4d5e44ff2d7c6b7b735e4793a96bce5ebb2d8d9271daf5e21f2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wafsolver-0.0.2-py3-none-any.whl

Download URL wafsolver-0.0.2-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11f7a73b285109a963ad7e9be5c43751476a7a05a64ca44b90a25e654685af8f
BLAKE2b-256 checksum
How to use checksums
107a3d2d3e2fbad333e16aa73d5c021027aef4c9c5d6c0a3977e5036c98a265a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for wafsolver 0.0.2

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