LinuxCommandLibrary

httpx

Probe HTTP endpoints for information and status

TLDR

Run a probe against a [u]RL, host, IP Address or subnet (CIDR notation) showing probe status

$ httpx -probe [[-u|-target]] [url|host|ipaddress|subnet_with_cidr]
copy

Run a probe against multiple hosts showing status code with input from subfinder
$ subfinder [[-d|-domain]] [example.com] | httpx [[-sc|-status-code]]
copy

Run a rate limited probe against a list of hosts from a file showing technology detected and response time
$ httpx [[-rl|-rate-limit]] [150] [[-l|-list]] [path/to/newline_separated_hosts_list] [[-td|-tech-detect]] [[-rt|-response-time]]
copy

Run a probe against a [u]RL showing its webpage title, CDN/WAF in use, and page content hash
$ httpx [[-u|-target]] [url] -title -cdn -hash [sha256]
copy

Run a probe against a list of hosts with custom defined ports and timeout after certain seconds
$ httpx -probe [[-u|-target]] [host1,host2,...] [[-p|-ports]] http:[80,8000-8080],https:[443,8443] -timeout [10]
copy

Run a probe against a list of hosts filtering out codes of certain responses
$ httpx [[-u|-target]] [host1,host2,...] [[-fc|-filter-code]] [400,401,404]
copy

Run a probe against a list of hosts matching codes of certain responses
$ httpx [[-u|-target]] [host1,host2,...] [[-mc|-match-code]] [200,301,304]
copy

Run a probe against a URL saving screenshots of certain paths, with screenshot timeouts (assets are saved in ./output)
$ httpx [[-u|-target]] [https://www.github.com] -path [/tldr-pages/tldr,/projectdiscovery/httpx] [[-ss|-screenshot]] [[-st|-screenshot-timeout]] [10]
copy

SYNOPSIS

httpx [OPTIONS] -l <TARGETS_FILE>
or
echo <URL> | httpx [OPTIONS]

PARAMETERS

-l, --list <file>
    Path to a file containing a list of target URLs or hosts to probe.

-u, --url <url>
    Single target URL or host to probe.

-p, --ports <ports>
    Comma-separated list of ports to probe (e.g., 80,443,8080).

-sc, --status-code
    Display HTTP status code for each target.

-t, --title
    Extract and display the HTML title of the page.

-td, --tech-detect
    Perform technology detection to identify web frameworks, libraries, etc.

-json
    Output results in JSON format for programmatic parsing.

-silent
    Show only results, suppressing informational messages.

-timeout <duration>
    Timeout for HTTP requests (e.g., 5s).

-H, --header <header>
    Add a custom HTTP header to requests (e.g., 'User-Agent: MyProbe').

-follow-redirects
    Follow HTTP redirects.

-ip
    Display the resolved IP address of the target.

-cname
    Display CNAME records for the target.

-probe
    Show probe status for all targets, including those that failed.

DESCRIPTION

httpx is a high-performance HTTP client developed by ProjectDiscovery, specifically designed for rapid web server enumeration and content discovery. It allows security researchers, bug bounty hunters, and system administrators to quickly identify active web services, extract critical information like HTTP status codes, page titles, technology fingerprints, and CNAME/IP details.

It supports various input methods, including single URLs or lists of targets from a file, and excels in concurrent scanning to process large numbers of targets efficiently. Its flexible output options, including JSON, make it easily integratable into automated workflows for reconnaissance and asset discovery.

CAVEATS

While highly efficient for discovery, httpx is primarily a prober, not a vulnerability scanner. It provides information about web services but doesn't actively test for security flaws.

Using very high concurrency on target systems without prior consent can lead to service disruption or rate limiting. Always ensure responsible and ethical usage.

INSTALLATION

httpx can be installed via Go (go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest) or by downloading pre-compiled binaries from the ProjectDiscovery GitHub releases page, which are available for various operating systems.

COMMON USAGE PATTERNS

httpx is frequently chained with other tools in security workflows. For example, the output of a subdomain enumeration tool (like subfinder) or a port scanner (like naabu) can be piped as input to httpx for efficient HTTP probing.

Example: subfinder -d example.com | httpx -sc -title -td -json -o results.json
This command finds subdomains for 'example.com', then pipes them to httpx to get status codes, titles, and tech detection, saving the results in JSON format.

HISTORY

httpx is an open-source tool developed and maintained by ProjectDiscovery, a collective known for creating a suite of fast, Go-based command-line utilities for security reconnaissance and bug bounty hunting. It was developed to provide a rapid and reliable way to probe HTTP services, often acting as a foundational step before more in-depth analysis with tools like nuclei.

SEE ALSO

curl(1), nmap(1), masscan(8), nuclei(1)

Copied to clipboard