Skip to content

Commit bfbf71d

Browse files
committed
convert request/responses to bytes to allow sendind non-utf8 data
1 parent 95fdbb0 commit bfbf71d

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

cmd/example/client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ func init() {
7474
ClientCmd.Flags().StringSliceVar(&scanRequest.ExcludeMatchers, "exclude-matchers", []string{}, "Matchers to exclude")
7575
ClientCmd.Flags().StringSliceVar(&scanRequest.Severities, "severities", []string{}, "Severities to include")
7676
ClientCmd.Flags().StringSliceVar(&scanRequest.ExcludeSeverities, "exclude-severities", []string{}, "Severities to exclude")
77-
77+
ClientCmd.Flags().StringSliceVar(&scanRequest.Protocols, "protocols", []string{}, "Protocols to include")
78+
ClientCmd.Flags().StringSliceVar(&scanRequest.ExcludeProtocols, "exclude-protocols", []string{}, "Protocols to exclude")
7879
}
7980

8081
func main() {

pkg/nuclei/scan.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func eventToScanResult(event *output.ResultEvent) *pb.ScanResult {
5353
UniqueId: event.Interaction.UniqueID,
5454
FullId: event.Interaction.FullId,
5555
Qtype: event.Interaction.QType,
56-
RawRequest: event.Interaction.RawRequest,
57-
RawResponse: event.Interaction.RawResponse,
56+
RawRequest: []byte(event.Interaction.RawRequest),
57+
RawResponse: []byte(event.Interaction.RawResponse),
5858
SmtpFrom: event.Interaction.SMTPFrom,
5959
RemoteAddress: event.Interaction.RemoteAddress,
6060
Timestamp: event.Interaction.Timestamp.String(),
@@ -72,8 +72,8 @@ func eventToScanResult(event *output.ResultEvent) *pb.ScanResult {
7272
Path: event.Path,
7373
Matched: event.Matched,
7474
ExtractedResults: event.ExtractedResults,
75-
Request: event.Request,
76-
Response: event.Response,
75+
Request: []byte(event.Request),
76+
Response: []byte(event.Response),
7777
Ip: event.IP,
7878
Timestamp: event.Timestamp.String(),
7979
CurlCommand: event.CURLCommand,

pkg/service/service.pb.go

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/service/service.proto

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ message ScanResult {
5454
string path = 8;
5555
string matched = 9;
5656
repeated string extracted_results = 10;
57-
string request = 11;
58-
string response = 12;
57+
bytes request = 11;
58+
bytes response = 12;
5959
string ip = 13;
6060
string timestamp = 14;
6161
Interaction interaction = 15;
@@ -90,8 +90,8 @@ message Interaction {
9090
string unique_id = 2;
9191
string full_id = 3;
9292
string qtype = 4;
93-
string raw_request = 5;
94-
string raw_response = 6;
93+
bytes raw_request = 5;
94+
bytes raw_response = 6;
9595
string smtp_from = 7;
9696
string remote_address = 8;
9797
string timestamp = 9;

0 commit comments

Comments
 (0)