diff --git a/README.md b/README.md index 9bef2334..2011262e 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,7 @@ Flags: INPUT: -u, -list string[] target url / list to crawl -resume string resume scan using resume.cfg + -e, -exclude string[] exclude host matching specified filter ('cdn', 'private-ips', cidr, ip, regex) CONFIGURATION: -r, -resolvers string[] list of custom resolver (file or comma separated) diff --git a/pkg/output/fields.go b/pkg/output/fields.go index 72eefe56..ab8666b7 100644 --- a/pkg/output/fields.go +++ b/pkg/output/fields.go @@ -5,6 +5,7 @@ import ( "net/url" "os" "path" + "path/filepath" "strings" "github.com/projectdiscovery/gologger" @@ -84,7 +85,7 @@ func storeFields(output *Result, storeFields []string) { } func appendToFileField(parsed *url.URL, field, data string) { - file, err := os.OpenFile(path.Join(storeFieldsDirectory, fmt.Sprintf("%s_%s_%s.txt", parsed.Scheme, parsed.Hostname(), field)), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) + file, err := os.OpenFile(filepath.Join(storeFieldsDirectory, fmt.Sprintf("%s_%s_%s.txt", parsed.Scheme, parsed.Hostname(), field)), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666) if err != nil { return }