Skip to content

Commit c32acd0

Browse files
monitor403daiwei11tarunKoyalwar
authored
Fix: sometimes dnslog request record is uppercase caused by nuclei templates uneffective (#4697)
* Fix: sometimes dnslog request record is upper caused by cannot validate vuln * convert request to lower for dns only --------- Co-authored-by: daiwei11 <[email protected]> Co-authored-by: Tarun Koyalwar <[email protected]> Co-authored-by: Tarun Koyalwar <[email protected]>
1 parent 035db2c commit c32acd0

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cmd/integration-test/interactsh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import osutils "github.com/projectdiscovery/utils/os"
55
// All Interactsh related testcases
66
var interactshTestCases = []TestCaseInfo{
77
{Path: "protocols/http/interactsh.yaml", TestCase: &httpInteractshRequest{}, DisableOn: func() bool { return osutils.IsWindows() || osutils.IsOSX() }},
8-
{Path: "protocols/http/interactsh-stop-at-first-match.yaml", TestCase: &httpInteractshStopAtFirstMatchRequest{}, DisableOn: func() bool { return true }}, // disable this test for now
9-
{Path: "protocols/http/default-matcher-condition.yaml", TestCase: &httpDefaultMatcherCondition{}, DisableOn: func() bool { return true }}, // disable this test for now
8+
{Path: "protocols/http/interactsh-stop-at-first-match.yaml", TestCase: &httpInteractshStopAtFirstMatchRequest{}, DisableOn: func() bool { return true }},
9+
{Path: "protocols/http/default-matcher-condition.yaml", TestCase: &httpDefaultMatcherCondition{}, DisableOn: func() bool { return true }}, // disable this test for now
1010
{Path: "protocols/http/interactsh-requests-mc-and.yaml", TestCase: &httpInteractshRequestsWithMCAnd{}},
1111
}

pkg/protocols/common/interactsh/interactsh.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ func (c *Client) processInteractionForRequest(interaction *server.Interaction, d
160160
}()
161161
data.Event.Lock()
162162
data.Event.InternalEvent["interactsh_protocol"] = interaction.Protocol
163-
data.Event.InternalEvent["interactsh_request"] = interaction.RawRequest
163+
if strings.EqualFold(interaction.Protocol, "dns") {
164+
data.Event.InternalEvent["interactsh_request"] = strings.ToLower(interaction.RawRequest)
165+
} else {
166+
data.Event.InternalEvent["interactsh_request"] = interaction.RawRequest
167+
}
164168
data.Event.InternalEvent["interactsh_response"] = interaction.RawResponse
165169
data.Event.InternalEvent["interactsh_ip"] = interaction.RemoteAddress
166170
data.Event.Unlock()

0 commit comments

Comments
 (0)