mirror of https://github.com/daffainfo/nuclei.git
Better naming
parent
0983e8b9fa
commit
838f844837
|
@ -96,7 +96,7 @@ func isFilePath(path string) (bool, error) {
|
||||||
return info.Mode().IsRegular(), nil
|
return info.Mode().IsRegular(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Runner) translateToAbsolutePath(path string) (string, error) {
|
func (r *Runner) resolvePathIfRelative(path string) (string, error) {
|
||||||
if r.isRelative(path) {
|
if r.isRelative(path) {
|
||||||
newPath, err := r.resolvePath(path)
|
newPath, err := r.resolvePath(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -125,7 +125,7 @@ func (r *Runner) RunEnumeration() {
|
||||||
// parses user input, handle file/directory cases and produce a list of unique templates
|
// parses user input, handle file/directory cases and produce a list of unique templates
|
||||||
for _, t := range r.options.Templates {
|
for _, t := range r.options.Templates {
|
||||||
// resolve and convert relative to absolute path
|
// resolve and convert relative to absolute path
|
||||||
absPath, err := r.translateToAbsolutePath(t)
|
absPath, err := r.resolvePathIfRelative(t)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
gologger.Errorf("Could not find template file '%s': %s\n", t, err)
|
gologger.Errorf("Could not find template file '%s': %s\n", t, err)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue