Skip to content

Commit b247b8e

Browse files
committed
Land rapid7#9492, fix for reverse port forwards
2 parents 2eca3b9 + d5ae2bb commit b247b8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/rex/post/meterpreter/pivot.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,22 @@ class << self
4545
# Class request handler for all channels that dispatches requests
4646
# to the appropriate class instance's DIO handler
4747
def request_handler(client, packet)
48+
handled = false
4849
if packet.method == 'core_pivot_session_new'
50+
handled = true
4951
session_guid = packet.get_tlv_value(TLV_TYPE_SESSION_GUID)
5052
listener_id = packet.get_tlv_value(TLV_TYPE_PIVOT_ID)
5153
client.add_pivot_session(Pivot.new(client, session_guid, listener_id))
5254
elsif packet.method == 'core_pivot_session_died'
55+
handled = true
5356
session_guid = packet.get_tlv_value(TLV_TYPE_SESSION_GUID)
5457
pivot = client.find_pivot_session(session_guid)
5558
if pivot
5659
pivot.pivoted_session.kill('Died')
5760
client.remove_pivot_session(session_guid)
5861
end
5962
end
60-
true
63+
handled
6164
end
6265
end
6366

0 commit comments

Comments
 (0)