mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2026-01-31 15:53:10 +08:00
chore: fix some comments (#5432)
Signed-off-by: fudancoder <fudancoder@icloud.com>
This commit is contained in:
@@ -162,7 +162,7 @@ func RunNucleiArgsAndGetErrors(debug bool, env []string, extra ...string) ([]str
|
||||
return results, err
|
||||
}
|
||||
|
||||
// RunNucleiArgsWithEnvAndGetErrors returns a list of errors in nuclei output (ERR,WRN,FTL)
|
||||
// RunNucleiArgsWithEnvAndGetResults returns a list of results in nuclei output (ERR,WRN,FTL)
|
||||
func RunNucleiArgsWithEnvAndGetResults(debug bool, env []string, extra ...string) ([]string, error) {
|
||||
cmd := exec.Command("./nuclei")
|
||||
extra = append(extra, ExtraDebugArgs...)
|
||||
|
||||
@@ -592,7 +592,7 @@ func (o *Options) GetValidAbsPath(helperFilePath, templatePath string) (string,
|
||||
return "", errorutil.New("access to helper file %v denied", helperFilePath)
|
||||
}
|
||||
|
||||
// isRootDir checks if given is root directory
|
||||
// isHomeDir checks if given is home directory
|
||||
func isHomeDir(path string) bool {
|
||||
homeDir := folderutil.HomeDirOrDefault("")
|
||||
return strings.HasPrefix(path, homeDir)
|
||||
|
||||
@@ -35,7 +35,7 @@ func IsURL(input string) bool {
|
||||
return err == nil && u.Scheme != "" && u.Host != ""
|
||||
}
|
||||
|
||||
// ReadFromPathOrURL reads and returns the contents of a file or url.
|
||||
// ReaderFromPathOrURL reads and returns the contents of a file or url.
|
||||
func ReaderFromPathOrURL(templatePath string, catalog catalog.Catalog) (io.ReadCloser, error) {
|
||||
if IsURL(templatePath) {
|
||||
resp, err := retryablehttp.DefaultClient().Get(templatePath)
|
||||
|
||||
Reference in New Issue
Block a user