httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.
httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library.
Features • Installation • Usage • Documentation • Notes • Join Discord
httpx is a fast and multi-purpose HTTP toolkit that allows running multiple probes using the retryablehttp library. It is designed to maintain result reliability with an increased number of threads.
| Probes | Default check | Probes | Default check |
|---|---|---|---|
| URL | true | IP | true |
| Title | true | CNAME | true |
| Status Code | true | Raw HTTP | false |
| Content Length | true | HTTP2 | false |
| TLS Certificate | true | HTTP Pipeline | false |
| CSP Header | true | Virtual host | false |
| Line Count | true | Word Count | true |
| Location Header | true | CDN | false |
| Web Server | true | Paths | false |
| Web Socket | true | Ports | false |
| Response Time | true | Request Method | true |
| Favicon Hash | false | Probe Status | false |
| Body Hash | true | Header Hash | true |
| Redirect chain | false | URL Scheme | true |
| JARM Hash | false | ASN | false |
httpx requires go >=1.25.0 to install successfully. Run the following command to get the repo:
go install -v github.com/projectdiscovery/httpx/cmd/httpx@latestTo learn more about installing httpx, see https://docs.projectdiscovery.io/tools/httpx/install.
| :exclamation: Disclaimer |
|---|
| This project is in active development. Expect breaking changes with releases. Review the changelog before updating. |
| This project was primarily built to be used as a standalone CLI tool. Running it as a service may pose security risks. It's recommended to use with caution and additional security measures. |
httpx -hThis will display help for the tool. Here are all the switches it supports.
…For details about running httpx, see https://docs.projectdiscovery.io/tools/httpx/running.
httpx as a libraryhttpx can be used as a library by creating an instance of the Option struct and populating it with the same options that would be specified via CLI. Once validated, the struct should be passed to a runner instance (to be closed at the end of the program) and the RunEnumeration method should be called. A minimal example of how to do it is in the examples folder.
Below are practical one-liners for common use cases leveraging httpx's composable primitives. These recipes are validated in runner/wellknown_recipes_test.go.
Use -mdc with DSL helpers such as contains(content_type, ...) and contains(body, ...) to match response metadata and body content. (-mr/-ms match the full raw response; use -mdc for structured field matching.)
security.txt
Probe for a valid RFC 9116 security.txt file at the standard paths (/.well-known/security.txt, /security.txt):
echo target.com | httpx -path '/.well-known/security.txt,/security.txt' -mc 200 -mdc 'contains(content_type, "text/plain") && contains(body, "Contact:") && contains_any(body, "mailto:", "https://")'-path tests custom path(s)-mc 200 matches HTTP 200-mdc matches using DSL expressions on response fields such as content_type and bodyrobots.txt
echo target.com | httpx -path '/robots.txt' -mc 200 -mdc 'contains(content_type, "text/plain")'sitemap.xml
echo target.com | httpx -path '/sitemap.xml' -mc 200 -mdc 'contains_any(content_type, "application/xml", "text/xml") && contains(body, "<urlset")'humans.txt
echo target.com | httpx -path '/humans.txt' -mc 200 -mdc 'contains(content_type, "text/plain")'ads.txt
echo target.com | httpx -path '/ads.txt' -mc 200 -mdc 'contains(content_type, "text/plain") && contains(body, "google.com")'OpenID Connect discovery (spec)
echo target.com | httpx -path '/.well-known/openid-configuration' -mc 200 -mdc 'contains(content_type, "application/json") && contains(body, "\"issuer\"")'Apple Universal Links
echo target.com | httpx -path '/.well-known/apple-app-site-association,/.well-known/apple-app-site-association.json' -mc 200 -mdc 'contains(content_type, "application/json") && contains(body, "\"applinks\"")'Android App Links
echo target.com | httpx -path '/.well-known/assetlinks.json' -mc 200 -mdc 'contains(content_type, "application/json") && contains(body, "\"android_app\"")'crossdomain.xml (legacy Flash policy file)
echo target.com | httpx -path '/crossdomain.xml' -mc 200 -mdc 'contains_any(content_type, "application/xml", "text/xml") && contains(body, "cross-domain-policy")'Other well-known URIs (IANA registry):
echo target.com | httpx -path '/.well-known/security.txt,/.well-known/change-password,/.well-known/openid-configuration' -mc 200httpx probe with HTTPS scheme and fall-back to HTTP only if HTTPS is not reachable.-l burp-export.xml -im burp-no-fallback flag can be used to probe and display both HTTP and HTTPS result.-ports http:443,http:80,https:8443protocol:resolver:port (e.g. udp:127.0.0.1:53)-sf secrets.yaml. Supported auth types: BasicAuth, BearerToken, Header, Cookie, Query. Example:id: example-auth
info:
name: Example Auth Config
static:
- type: Header
domains:
- api.example.com
headers:
- key: X-API-Key
value: secret-key-here
- type: BasicAuth
domains-regex:
- ".*\\.internal\\.com$"
username: admin
password: secret-ports-path-vhost-screenshot-csp-probe-tls-probe-favicon-http2-pipeline-tls-impersonateProbing feature is inspired by @tomnomnom/httprobe work ❤️
Race in runner initialization when copying the active rate limiter
Headless screenshots are slow and can capture half-rendered SPAs
Add a local mirror of the hugging face model JSON
DNS issues with VPN usage