2
2
require 'rex/io/stream_abstraction'
3
3
require 'rex/sync/ref'
4
4
require 'rex/payloads/meterpreter/uri_checksum'
5
- require 'rex/post/meterpreter/packet '
5
+ require 'rex/post/meterpreter'
6
6
require 'rex/parser/x509_certificate'
7
7
require 'msf/core/payload/windows/verify_ssl'
8
8
@@ -19,7 +19,6 @@ module ReverseHttp
19
19
include Msf ::Handler
20
20
include Rex ::Payloads ::Meterpreter ::UriChecksum
21
21
include Msf ::Payload ::Windows ::VerifySsl
22
- include Rex ::Post ::Meterpreter
23
22
24
23
#
25
24
# Returns the string representation of the handler type
@@ -258,15 +257,11 @@ def on_request(cli, req, obj)
258
257
# Handle the case where stageless payloads call in on the same URI when they
259
258
# first connect. From there, we tell them to callback on a connect URI that
260
259
# was generated on the fly. This means we form a new session for each.
261
- sum = uri_checksum_lookup ( :connect )
262
- new_uri = generate_uri_uuid ( sum , uuid ) + '/'
263
260
264
- # This bit is going to need to be validated by the Ruby/MSF masters as I
265
- # am not sure that this is the best way to get a TLV packet out from this
266
- # handler.
267
261
# Hurl a TLV back at the caller, and ignore the response
268
- pkt = Packet . new ( PACKET_TYPE_RESPONSE , 'core_patch_url' )
269
- pkt . add_tlv ( TLV_TYPE_TRANS_URL , new_uri )
262
+ pkt = Rex ::Post ::Meterpreter ::Packet . new ( Rex ::Post ::Meterpreter ::PACKET_TYPE_RESPONSE ,
263
+ 'core_patch_url' )
264
+ pkt . add_tlv ( Rex ::Post ::Meterpreter ::TLV_TYPE_TRANS_URL , conn_id + "/" )
270
265
resp . body = pkt . to_r
271
266
272
267
when :init_python
0 commit comments