From 0446c0d4c45b23ffc20081da1c2fbc5adf0e93e5 Mon Sep 17 00:00:00 2001 From: sjanusz-r7 Date: Tue, 14 Apr 2026 12:06:52 +0100 Subject: [PATCH] Notes returned as valid json instead of inspected string over RPC --- lib/msf/core/rpc/v10/rpc_db.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msf/core/rpc/v10/rpc_db.rb b/lib/msf/core/rpc/v10/rpc_db.rb index b7309d5adf9fb..249ca991196d9 100644 --- a/lib/msf/core/rpc/v10/rpc_db.rb +++ b/lib/msf/core/rpc/v10/rpc_db.rb @@ -1130,8 +1130,8 @@ def rpc_report_note(xopts) # * 'time' [Integer] Creation date. # * 'host' [String] Host address. # * 'service' [String] Service name or port. - # * 'type' [String] Host type. - # * 'data' [String] Host data. + # * 'type' [String] Note type. + # * 'data' [Hash, String, nil] Note data. # @example Here's how you would use this from the client: # # This gives you all the notes. # rpc.call('db.notes', {}) @@ -1157,7 +1157,7 @@ def rpc_notes(xopts) note[:host] = n.host.address if n.host note[:service] = n.service.name || n.service.port if n.service note[:type ] = n.ntype.to_s - note[:data] = n.data.inspect + note[:data] = n.data ret[:notes] << note end ret