diff --git a/extensions/proxy/proxy.rb b/extensions/proxy/proxy.rb index 9e744ea22a..99dfadb9e3 100644 --- a/extensions/proxy/proxy.rb +++ b/extensions/proxy/proxy.rb @@ -97,8 +97,10 @@ def handle_request socket tolerant_parser = URI::Parser.new(:UNRESERVED => BeEF::Core::Configuration.instance.get("beef.extension.requester.uri_unreserved_chars")) uri = tolerant_parser.parse(url.to_s) + uri_path_and_qs = uri.query.nil? ? uri.path : "#{uri.path}?#{uri.query}" + # extensions/requester/api/hook.rb parses raw_request to find port and path - raw_request = [method, uri.path, version].join(' ') + "\r\n" + raw_request = [method, uri_path_and_qs, version].join(' ') + "\r\n" content_length = 0 loop do @@ -127,7 +129,7 @@ def handle_request socket :proto => proto, :domain => uri.host, :port => uri.port, - :path => uri.path, + :path => uri_path_and_qs, :request_date => Time.now, :hooked_browser_id => self.get_tunneling_proxy, :allow_cross_domain => "true"