mirror of https://github.com/daffainfo/nuclei.git
add integration test
parent
b4b769d501
commit
61fc7350d1
|
@ -0,0 +1,27 @@
|
|||
id: interactsh-requests-mc-and
|
||||
|
||||
info:
|
||||
name: interactsh multi request matcher condition
|
||||
author: pdteam
|
||||
severity: info
|
||||
|
||||
requests:
|
||||
- raw:
|
||||
- |
|
||||
GET /api/geoping/{{interactsh-url}} HTTP/1.1
|
||||
Host: {{Hostname}}
|
||||
|
||||
- |
|
||||
GET / HTTP/1.1
|
||||
Host: {{Hostname}}
|
||||
|
||||
matchers-condition: and
|
||||
matchers:
|
||||
- type: word
|
||||
part: interactsh_protocol # Confirms the DNS Interaction
|
||||
words:
|
||||
- "dns"
|
||||
|
||||
- type: dsl
|
||||
dsl:
|
||||
- "status_code_2 == 200"
|
|
@ -1465,3 +1465,13 @@ func (h *httpDisablePathAutomerge) Execute(filePath string) error {
|
|||
}
|
||||
return expectResultsCount(got, 2)
|
||||
}
|
||||
|
||||
type httpInteractshRequestsWithMCAnd struct{}
|
||||
|
||||
func (h *httpInteractshRequestsWithMCAnd) Execute(filePath string) error {
|
||||
got, err := testutils.RunNucleiTemplateAndGetResults(filePath, "honey.scanme.sh", debug)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return expectResultsCount(got, 1)
|
||||
}
|
||||
|
|
|
@ -7,4 +7,5 @@ var interactshTestCases = []TestCaseInfo{
|
|||
{Path: "http/interactsh.yaml", TestCase: &httpInteractshRequest{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }},
|
||||
{Path: "http/interactsh-stop-at-first-match.yaml", TestCase: &httpInteractshStopAtFirstMatchRequest{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }},
|
||||
{Path: "http/default-matcher-condition.yaml", TestCase: &httpDefaultMatcherCondition{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }},
|
||||
{Path: "http/interactsh-requests-mc-and.yaml", TestCase: &httpInteractshRequestsWithMCAnd{}},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue