Skip to content

Commit 8051f79

Browse files
committed
if there is info in the uuid_db, put it in payload_uuid automatically
1 parent c695828 commit 8051f79

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/msf/core/handler.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,13 @@ def create_session(conn, opts={})
222222
s.set_from_exploit(assoc_exploit)
223223

224224
# Pass along any associated payload uuid if specified
225-
s.payload_uuid = opts[:payload_uuid] if opts[:payload_uuid]
225+
if opts[:payload_uuid]
226+
s.payload_uuid = opts[:payload_uuid]
227+
if s.payload_uuid.respond_to?(:puid_hex) && (uuid_info = framework.uuid_db[sess_puid])
228+
s.payload_uuid.name = uuid_info['name']
229+
s.payload_uuid.timestamp = uuid_info['timestamp']
230+
end
231+
end
226232

227233
# If the session is valid, register it with the framework and
228234
# notify any waiters we may have.

0 commit comments

Comments
 (0)