diff --git a/README.md b/README.md index 283e669..58ba92d 100644 --- a/README.md +++ b/README.md @@ -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`) diff --git a/common/inputformats/burp.go b/common/inputformats/burp.go index 0e49b2f..8af3432 100644 --- a/common/inputformats/burp.go +++ b/common/inputformats/burp.go @@ -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) { diff --git a/runner/options.go b/runner/options.go index e87bd4d..a8bfeb5 100644 --- a/runner/options.go +++ b/runner/options.go @@ -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 {