mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 22:55:27 +00:00
Fixed jsonschema for matchertype missing String()
This commit is contained in:
parent
66dacccfb4
commit
bdf1c2010b
@ -87,15 +87,15 @@ Examples:
|
|||||||
```yaml
|
```yaml
|
||||||
requests:
|
requests:
|
||||||
matchers:
|
matchers:
|
||||||
- type: 1
|
- type: word
|
||||||
words:
|
words:
|
||||||
- '[core]'
|
- '[core]'
|
||||||
- type: 6
|
- type: dsl
|
||||||
condition: and
|
condition: and
|
||||||
dsl:
|
dsl:
|
||||||
- '!contains(tolower(body), ''<html'')'
|
- '!contains(tolower(body), ''<html'')'
|
||||||
- '!contains(tolower(body), ''<body'')'
|
- '!contains(tolower(body), ''<body'')'
|
||||||
- type: 4
|
- type: status
|
||||||
status:
|
status:
|
||||||
- 200
|
- 200
|
||||||
matchers-condition: and
|
matchers-condition: and
|
||||||
@ -194,7 +194,7 @@ network:
|
|||||||
- data: "envi\r\nquit\r\n"
|
- data: "envi\r\nquit\r\n"
|
||||||
read-size: 2048
|
read-size: 2048
|
||||||
matchers:
|
matchers:
|
||||||
- type: 1
|
- type: word
|
||||||
words:
|
words:
|
||||||
- zookeeper.version
|
- zookeeper.version
|
||||||
```
|
```
|
||||||
@ -688,15 +688,15 @@ Appears in:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
matchers:
|
matchers:
|
||||||
- type: 1
|
- type: word
|
||||||
words:
|
words:
|
||||||
- '[core]'
|
- '[core]'
|
||||||
- type: 6
|
- type: dsl
|
||||||
condition: and
|
condition: and
|
||||||
dsl:
|
dsl:
|
||||||
- '!contains(tolower(body), ''<html'')'
|
- '!contains(tolower(body), ''<html'')'
|
||||||
- '!contains(tolower(body), ''<body'')'
|
- '!contains(tolower(body), ''<body'')'
|
||||||
- type: 4
|
- type: status
|
||||||
status:
|
status:
|
||||||
- 200
|
- 200
|
||||||
matchers-condition: and
|
matchers-condition: and
|
||||||
@ -2396,7 +2396,7 @@ inputs:
|
|||||||
- data: "envi\r\nquit\r\n"
|
- data: "envi\r\nquit\r\n"
|
||||||
read-size: 2048
|
read-size: 2048
|
||||||
matchers:
|
matchers:
|
||||||
- type: 1
|
- type: word
|
||||||
words:
|
words:
|
||||||
- zookeeper.version
|
- zookeeper.version
|
||||||
```
|
```
|
||||||
|
|||||||
@ -307,12 +307,12 @@
|
|||||||
},
|
},
|
||||||
"matchers.MatcherTypeHolder": {
|
"matchers.MatcherTypeHolder": {
|
||||||
"enum": [
|
"enum": [
|
||||||
1,
|
"word",
|
||||||
2,
|
"regex",
|
||||||
3,
|
"binary",
|
||||||
4,
|
"status",
|
||||||
5,
|
"size",
|
||||||
6
|
"dsl"
|
||||||
],
|
],
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "type of the matcher",
|
"title": "type of the matcher",
|
||||||
|
|||||||
@ -86,7 +86,7 @@ func (holder MatcherTypeHolder) JSONSchemaType() *jsonschema.Type {
|
|||||||
Description: "Type of the matcher,enum=status,enum=size,enum=word,enum=regex,enum=binary,enum=dsl",
|
Description: "Type of the matcher,enum=status,enum=size,enum=word,enum=regex,enum=binary,enum=dsl",
|
||||||
}
|
}
|
||||||
for _, types := range GetSupportedMatcherTypes() {
|
for _, types := range GetSupportedMatcherTypes() {
|
||||||
gotType.Enum = append(gotType.Enum, types)
|
gotType.Enum = append(gotType.Enum, types.String())
|
||||||
}
|
}
|
||||||
return gotType
|
return gotType
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user