mirror of https://github.com/daffainfo/nuclei.git
Use target filepath instead of target dir path to upload targets (#3182)
parent
e899afafdf
commit
924da4197b
|
@ -245,8 +245,8 @@ func (r *Runner) addTarget(location string) error {
|
||||||
if d.IsDir() || !strings.EqualFold(filepath.Ext(path), ".txt") {
|
if d.IsDir() || !strings.EqualFold(filepath.Ext(path), ".txt") {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
base := filepath.Base(location)
|
base := filepath.Base(path)
|
||||||
reference, targetErr := r.cloudClient.AddTarget(base, location)
|
reference, targetErr := r.cloudClient.AddTarget(base, path)
|
||||||
if targetErr != nil {
|
if targetErr != nil {
|
||||||
gologger.Error().Msgf("Could not upload %s: %s", location, targetErr)
|
gologger.Error().Msgf("Could not upload %s: %s", location, targetErr)
|
||||||
} else if reference != "" {
|
} else if reference != "" {
|
||||||
|
|
Loading…
Reference in New Issue