mirror of
https://github.com/projectdiscovery/httpx
synced 2026-06-08 16:50:17 +00:00
docs update + flags validation + debug logging
This commit is contained in:
@@ -92,9 +92,10 @@ Usage:
|
||||
|
||||
Flags:
|
||||
INPUT:
|
||||
-l, -list string input file containing list of hosts to process
|
||||
-rr, -request string file containing raw request
|
||||
-u, -target string[] input target host(s) to probe
|
||||
-l, -list string input file containing list of hosts to process
|
||||
-rr, -request string file containing raw request
|
||||
-u, -target string[] input target host(s) to probe
|
||||
-im, -input-mode string mode of input file (burp)
|
||||
|
||||
PROBES:
|
||||
-sc, -status-code display response status-code
|
||||
@@ -279,6 +280,7 @@ For details about running httpx, see https://docs.projectdiscovery.io/tools/http
|
||||
# Notes
|
||||
|
||||
- As default, `httpx` probe with **HTTPS** scheme and fall-back to **HTTP** only if **HTTPS** is not reachable.
|
||||
- Burp Suite XML exports can be used as input with `-l burp-export.xml -im burp`
|
||||
- The `-no-fallback` flag can be used to probe and display both **HTTP** and **HTTPS** result.
|
||||
- Custom scheme for ports can be defined, for example `-ports http:443,http:80,https:8443`
|
||||
- Custom resolver supports multiple protocol (**doh|tcp|udp**) in form of `protocol:resolver:port` (e.g. `udp:127.0.0.1:53`)
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/projectdiscovery/gologger"
|
||||
"github.com/seh-msft/burpxml"
|
||||
)
|
||||
|
||||
@@ -30,8 +31,9 @@ func (b *BurpFormat) Parse(input io.Reader, callback func(url string) bool) erro
|
||||
return errors.Wrap(err, "could not parse burp xml")
|
||||
}
|
||||
|
||||
for _, item := range items.Items {
|
||||
for i, item := range items.Items {
|
||||
if item.Url == "" {
|
||||
gologger.Debug().Msgf("Skipping burp item %d: empty URL", i)
|
||||
continue
|
||||
}
|
||||
if !callback(item.Url) {
|
||||
|
||||
@@ -684,6 +684,10 @@ func (options *Options) ValidateOptions() error {
|
||||
return fmt.Errorf("invalid input mode '%s', supported formats: %s", options.InputMode, inputformats.SupportedFormats())
|
||||
}
|
||||
|
||||
if options.InputMode != "" && options.InputFile == "" {
|
||||
return errors.New("-im/-input-mode requires -l/-list to specify an input file")
|
||||
}
|
||||
|
||||
if options.Silent {
|
||||
incompatibleFlagsList := flagsIncompatibleWithSilent(options)
|
||||
if len(incompatibleFlagsList) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user