Using httprobe (with examples)
1: Probe a list of domains from a text file
cat input_file | httprobe
Motivation: This use case is helpful when you have a list of domains stored in a text file and you want to check if there are any working HTTP or HTTPS servers for each domain.
Explanation: The cat
command is used to read the contents of the input file and pass it as input to httprobe
. httprobe
will then probe each domain to check if there is a working HTTP or HTTPS server.
Example Output:
http://example.com
https://example.com
http://domain.com
https://domain.com
2: Only check for HTTP if HTTPS is not working
cat input_file | httprobe --prefer-https
Motivation: In some cases, you may want to prioritize checking if there is a working HTTPS server, but also fall back to checking HTTP if HTTPS is not available.
Explanation: The --prefer-https
flag tells httprobe
to prioritize checking HTTPS servers first. If HTTPS is not working for a domain, httprobe
will then check if there is a working HTTP server.
Example Output:
https://example.com
https://domain.com
http://example.com
http://domain.com
3: Probe additional ports with a given protocol
cat input_file | httprobe -p https:2222
Motivation: Sometimes, you may have specific ports other than the default HTTPS port (port 443) that you want to probe for.
Explanation: The -p
flag followed by the protocol and port number is used to specify which additional ports should be probed. In this example, we are probing the HTTPS protocol with port 2222. httprobe
will check if there is a working HTTPS server on port 2222 for each domain.
Example Output:
https://example.com:2222
http://example.com
https://domain.com:2222
http://domain.com
4: Output all available options
httprobe --help
Motivation: If you want to get more information about the available options and flags for httprobe
, you can use the --help
flag.
Explanation: The --help
flag displays a detailed usage guide and the available options for the httprobe
command.
Example Output:
Usage: httprobe [options]
Take a list of domains and probe for working HTTP and HTTPS servers.
Options:
-c, --concurrent int set the concurrency level (default 50)
-f, --file string file containing domains
-p, --probe string specify a protocol and port to probe (default "https")
--prefer-https only check HTTP if HTTPS fails
--prefer-http only check HTTPS if HTTP fails
--timeout duration maximum time allowed for probing (default 5s)
--version display the version number and exit