From 8b93f27dfe49a3b9b384766b63a6377bb36c7329 Mon Sep 17 00:00:00 2001 From: mzack Date: Mon, 15 Apr 2024 22:52:21 +0200 Subject: [PATCH] fixing example --- common/httpx/proto.go | 8 ++++---- runner/options.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/httpx/proto.go b/common/httpx/proto.go index e31e98a..3036529 100644 --- a/common/httpx/proto.go +++ b/common/httpx/proto.go @@ -3,8 +3,8 @@ package httpx type Proto string const ( - AUTO Proto = "auto" - HTTP11 Proto = "http11" - HTTP2 Proto = "http2" - HTTP3 Proto = "http3" + UNKNOWN Proto = "" + HTTP11 Proto = "http11" + HTTP2 Proto = "http2" + HTTP3 Proto = "http3" ) diff --git a/runner/options.go b/runner/options.go index 1a5aa99..79c2637 100644 --- a/runner/options.go +++ b/runner/options.go @@ -420,7 +420,7 @@ func ParseOptions() *Options { flagSet.BoolVar(&options.chainInStdout, "include-chain", false, "include redirect http chain in JSON output (-json only)"), flagSet.BoolVar(&options.StoreChain, "store-chain", false, "include http redirect chain in responses (-sr only)"), flagSet.BoolVarP(&options.StoreVisionReconClusters, "store-vision-recon-cluster", "svrc", false, "include visual recon clusters (-ss and -sr only)"), - flagSet.StringVarP(&options.Protocol, "protocol", "pr", "auto", "protocol to use (auto, http11)"), + flagSet.StringVarP(&options.Protocol, "protocol", "pr", "", "protocol to use (unknown, http11)"), ) flagSet.CreateGroup("configs", "Configurations", @@ -672,7 +672,7 @@ func (options *Options) ValidateOptions() error { options.OutputCDN = "true" } - if !stringsutil.EqualFoldAny(options.Protocol, string(httpx.AUTO), string(httpx.HTTP11)) { + if !stringsutil.EqualFoldAny(options.Protocol, string(httpx.UNKNOWN), string(httpx.HTTP11)) { return fmt.Errorf("invalid protocol: %s", options.Protocol) }