diff --git a/.gitignore b/.gitignore index 1aae5fa9..629564ec 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ katana *.exe katana_*/ katana_*/ -dist/ \ No newline at end of file +dist/ + +.vscode +.devcontainer \ No newline at end of file diff --git a/go.mod b/go.mod index f1c92f7a..770fd6dd 100644 --- a/go.mod +++ b/go.mod @@ -15,10 +15,10 @@ require ( github.com/projectdiscovery/fastdialer v0.0.45 github.com/projectdiscovery/goflags v0.1.29 github.com/projectdiscovery/gologger v1.1.11 - github.com/projectdiscovery/hmap v0.0.27 + github.com/projectdiscovery/hmap v0.0.28 github.com/projectdiscovery/ratelimit v0.0.16 github.com/projectdiscovery/retryablehttp-go v1.0.37 - github.com/projectdiscovery/utils v0.0.65 + github.com/projectdiscovery/utils v0.0.67 github.com/projectdiscovery/wappalyzergo v0.0.109 github.com/remeh/sizedwaitgroup v1.0.0 github.com/rs/xid v1.5.0 diff --git a/go.sum b/go.sum index 3bf918fa..756aebd1 100644 --- a/go.sum +++ b/go.sum @@ -188,8 +188,8 @@ github.com/projectdiscovery/gologger v1.1.11 h1:8vsz9oJlDT9euw6xlj7F7dZ6RWItVIqV github.com/projectdiscovery/gologger v1.1.11/go.mod h1:UR2bgXl7zraOxYGnUwuO917hifWrwMJ0feKnVqMQkzY= github.com/projectdiscovery/gostruct v0.0.2 h1:s8gP8ApugGM4go1pA+sVlPDXaWqNP5BBDDSv7VEdG1M= github.com/projectdiscovery/gostruct v0.0.2/go.mod h1:H86peL4HKwMXcQQtEa6lmC8FuD9XFt6gkNR0B/Mu5PE= -github.com/projectdiscovery/hmap v0.0.27 h1:I4oYpNRmEYSs0CAL6qlxxKL60wn84tMgV2hC2jgB1/A= -github.com/projectdiscovery/hmap v0.0.27/go.mod h1:QOzaiI4PATlCb4bE50CLC6RAJ+wz0RXtlQUrR2vFmAI= +github.com/projectdiscovery/hmap v0.0.28 h1:2FrjMtGi5Xbh07AuidN1s+gAw6KJixZZ/QT5XcC3448= +github.com/projectdiscovery/hmap v0.0.28/go.mod h1:EkSVc8LdqRNDEjzGXwFWIkmQE467mZnVVaKK1kKrbUk= github.com/projectdiscovery/mapcidr v1.1.15 h1:rYAgxLvMyxPU0JunE/Y3uSK1n/TcNJHK839d6YM0ms4= github.com/projectdiscovery/mapcidr v1.1.15/go.mod h1:s9erRsoZqWcLGhJW+WT1SnbscqzhHRRnSX916xBw5ZM= github.com/projectdiscovery/networkpolicy v0.0.6 h1:yDvm0XCrS9HeemRrBS+J+22surzVczM94W5nHiOy/1o= @@ -200,8 +200,8 @@ github.com/projectdiscovery/retryabledns v1.0.43 h1:QQPwb1J7NvjAjyXueKS/ZmoAqofD github.com/projectdiscovery/retryabledns v1.0.43/go.mod h1:ZKe4nKyrmZhoxEOL5DLaqqNP7QN9lqeu15sfBigxmqU= github.com/projectdiscovery/retryablehttp-go v1.0.37 h1:sdMEj+Rno3lHJGRfx+F8+PPLGluJA1k1gYLhegUjTAo= github.com/projectdiscovery/retryablehttp-go v1.0.37/go.mod h1:4b+LWch6Vu9aUBRlWqd5mq4ncpkz1vDIyu0dcrf/84w= -github.com/projectdiscovery/utils v0.0.65 h1:QanNhSFhOfkUjniSlsV2Exm3m5MDyTGmpKbJDMcAVhg= -github.com/projectdiscovery/utils v0.0.65/go.mod h1:qs8T5JWLIXZmoc1DbUkihFVTjPtuYgJ3WOmaNQedhwg= +github.com/projectdiscovery/utils v0.0.67 h1:XNUOoWyhk/HdURffFbdBGcxw5xT3YJtayEy8bsgUGXg= +github.com/projectdiscovery/utils v0.0.67/go.mod h1:XB/adTcVtYn9EPMJfvRM+2oHhqYioHSM2WIHvUGtJ18= github.com/projectdiscovery/wappalyzergo v0.0.109 h1:BERfwTRn1dvB1tbhyc5m67R8VkC9zbVuPsEq4VEm07k= github.com/projectdiscovery/wappalyzergo v0.0.109/go.mod h1:4Z3DKhi75zIPMuA+qSDDWxZvnhL4qTLmDx4dxNMu7MA= github.com/quic-go/quic-go v0.37.4 h1:ke8B73yMCWGq9MfrCCAw0Uzdm7GaViC3i39dsIdDlH4= diff --git a/internal/runner/options.go b/internal/runner/options.go index 217c7508..7ce784f5 100644 --- a/internal/runner/options.go +++ b/internal/runner/options.go @@ -128,8 +128,7 @@ func initExampleFormFillConfig() error { defaultConfig := filepath.Join(homedir, ".config", "katana", "form-config.yaml") if fileutil.FileExists(defaultConfig) { - readCustomFormConfig(defaultConfig) - return nil + return readCustomFormConfig(defaultConfig) } if err := os.MkdirAll(filepath.Dir(defaultConfig), 0775); err != nil { return err diff --git a/pkg/engine/parser/parser.go b/pkg/engine/parser/parser.go index a1e3f064..45436ef7 100644 --- a/pkg/engine/parser/parser.go +++ b/pkg/engine/parser/parser.go @@ -539,6 +539,7 @@ func bodyFormTagParser(resp *navigation.Response) (navigationRequests []*navigat isMultipartForm := strings.HasPrefix(encType, "multipart/") queryValuesWriter := urlutil.NewOrderedParams() + queryValuesWriter.IncludeEquals = true var sb strings.Builder var multipartWriter *multipart.Writer @@ -557,7 +558,7 @@ func bodyFormTagParser(resp *navigation.Response) (navigationRequests []*navigat dataMap := utils.FormInputFillSuggestions(formInputs) dataMap.Iterate(func(key, value string) bool { - if key == "" || value == "" { + if key == "" { return true } if isMultipartForm {