Skip to content

Commit f445b0a

Browse files
committed
docs update + flags validation + debug logging
1 parent 430e33f commit f445b0a

3 files changed

Lines changed: 12 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ Usage:
9292

9393
Flags:
9494
INPUT:
95-
-l, -list string input file containing list of hosts to process
96-
-rr, -request string file containing raw request
97-
-u, -target string[] input target host(s) to probe
95+
-l, -list string input file containing list of hosts to process
96+
-rr, -request string file containing raw request
97+
-u, -target string[] input target host(s) to probe
98+
-im, -input-mode string mode of input file (burp)
9899

99100
PROBES:
100101
-sc, -status-code display response status-code
@@ -279,6 +280,7 @@ For details about running httpx, see https://docs.projectdiscovery.io/tools/http
279280
# Notes
280281

281282
- As default, `httpx` probe with **HTTPS** scheme and fall-back to **HTTP** only if **HTTPS** is not reachable.
283+
- Burp Suite XML exports can be used as input with `-l burp-export.xml -im burp`
282284
- The `-no-fallback` flag can be used to probe and display both **HTTP** and **HTTPS** result.
283285
- Custom scheme for ports can be defined, for example `-ports http:443,http:80,https:8443`
284286
- Custom resolver supports multiple protocol (**doh|tcp|udp**) in form of `protocol:resolver:port` (e.g. `udp:127.0.0.1:53`)

common/inputformats/burp.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"io"
55

66
"github.com/pkg/errors"
7+
"github.com/projectdiscovery/gologger"
78
"github.com/seh-msft/burpxml"
89
)
910

@@ -30,8 +31,9 @@ func (b *BurpFormat) Parse(input io.Reader, callback func(url string) bool) erro
3031
return errors.Wrap(err, "could not parse burp xml")
3132
}
3233

33-
for _, item := range items.Items {
34+
for i, item := range items.Items {
3435
if item.Url == "" {
36+
gologger.Debug().Msgf("Skipping burp item %d: empty URL", i)
3537
continue
3638
}
3739
if !callback(item.Url) {

runner/options.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,10 @@ func (options *Options) ValidateOptions() error {
684684
return fmt.Errorf("invalid input mode '%s', supported formats: %s", options.InputMode, inputformats.SupportedFormats())
685685
}
686686

687+
if options.InputMode != "" && options.InputFile == "" {
688+
return errors.New("-im/-input-mode requires -l/-list to specify an input file")
689+
}
690+
687691
if options.Silent {
688692
incompatibleFlagsList := flagsIncompatibleWithSilent(options)
689693
if len(incompatibleFlagsList) > 0 {

0 commit comments

Comments
 (0)