Method: Buby#evt_proxy_message_raw

Defined in:
lib/buby.rb

#evt_proxy_message_raw(msg_ref, is_req, rhost, rport, is_https, http_meth, url, resourceType, status, req_content_type, message, action) ⇒ Object

Seems we need to specifically render our ‘message’ to a string here in ruby. Otherwise there’s flakiness when converting certain binary non-ascii sequences. As long as we do it here, it should be fine.

Note: This method maps to the ‘processProxyMessage’ method in the java implementation of BurpExtender.

This method just handles the conversion to and from evt_proxy_message which expects a message string



1166
1167
1168
1169
1170
1171
1172
1173
1174
# File 'lib/buby.rb', line 1166

def evt_proxy_message_raw msg_ref, is_req, rhost, rport, is_https, http_meth, url, resourceType, status, req_content_type, message, action
  pp [:evt_proxy_message_raw_hit, msg_ref, is_req, rhost, rport, is_https, http_meth, url, resourceType, status, req_content_type, message, action ] if $DEBUG

  str_msg = String.from_java_bytes(message)
  ret = evt_proxy_message(msg_ref, is_req, rhost, rport, is_https, http_meth, url, resourceType, status, req_content_type, str_msg, action)

  message = ret.to_java_bytes if ret.object_id != str_msg.object_id
  return message
end