Skip to content

Commit a8c2049

Browse files
committed
Remove unused code from the java http stager
1 parent 0493ba8 commit a8c2049

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/msf/core/handler/reverse_http.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -313,21 +313,11 @@ def on_request(cli, req, obj)
313313
print_status("#{cli.peerhost}:#{cli.peerport} (UUID: #{uuid.to_s}) Staging Java payload ...")
314314
url = payload_uri(req) + conn_id + "/\x00"
315315

316-
blob = ""
317-
blob << obj.generate_stage(
316+
blob = obj.generate_stage(
318317
uuid: uuid,
319318
uri: conn_id
320319
)
321320

322-
# This is a TLV packet - I guess somewhere there should be an API for building them
323-
# in Metasploit :-)
324-
packet = ""
325-
packet << ["core_switch_url\x00".length + 8, 0x10001].pack('NN') + "core_switch_url\x00"
326-
packet << [url.length+8, 0x1000a].pack('NN')+url
327-
packet << [12, 0x2000b, datastore['SessionExpirationTimeout'].to_i].pack('NNN')
328-
packet << [12, 0x20019, datastore['SessionCommunicationTimeout'].to_i].pack('NNN')
329-
blob << [packet.length+8, 0].pack('NN') + packet
330-
331321
resp.body = blob
332322

333323
# Short-circuit the payload's handle_connection processing for create_session

0 commit comments

Comments
 (0)