mirror of https://github.com/daffainfo/nuclei.git
Added comma support to tags
parent
74c023016c
commit
fbf5be544f
|
@ -165,18 +165,22 @@ func matchTemplateWithTags(tags string, options *types.Options) error {
|
||||||
|
|
||||||
matched := false
|
matched := false
|
||||||
mainLoop:
|
mainLoop:
|
||||||
for _, tag := range options.Tags {
|
for _, t := range options.Tags {
|
||||||
|
commaTags := strings.Split(t, ",")
|
||||||
|
for _, tag := range commaTags {
|
||||||
key, value := getKeyValue(tag)
|
key, value := getKeyValue(tag)
|
||||||
|
|
||||||
for _, templTag := range actualTags {
|
for _, templTag := range actualTags {
|
||||||
templTag = strings.TrimSpace(templTag)
|
templTag = strings.TrimSpace(templTag)
|
||||||
tKey, tValue := getKeyValue(templTag)
|
tKey, tValue := getKeyValue(templTag)
|
||||||
|
|
||||||
if strings.EqualFold(key, tKey) && strings.EqualFold(value, tValue) {
|
if strings.EqualFold(key, tKey) && strings.EqualFold(value, tValue) {
|
||||||
matched = true
|
matched = true
|
||||||
break mainLoop
|
break mainLoop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if !matched {
|
if !matched {
|
||||||
return errors.New("could not match template tags with input")
|
return errors.New("could not match template tags with input")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue