From 8051f790d0cbf8bd7310fabce692a3d686d0c9a7 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Tue, 14 Nov 2017 20:13:35 -0600 Subject: [PATCH] if there is info in the uuid_db, put it in payload_uuid automatically --- lib/msf/core/handler.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/msf/core/handler.rb b/lib/msf/core/handler.rb index 70b60081e0..902e674aad 100644 --- a/lib/msf/core/handler.rb +++ b/lib/msf/core/handler.rb @@ -222,7 +222,13 @@ protected s.set_from_exploit(assoc_exploit) # Pass along any associated payload uuid if specified - s.payload_uuid = opts[:payload_uuid] if opts[:payload_uuid] + if opts[:payload_uuid] + s.payload_uuid = opts[:payload_uuid] + if s.payload_uuid.respond_to?(:puid_hex) && (uuid_info = framework.uuid_db[sess_puid]) + s.payload_uuid.name = uuid_info['name'] + s.payload_uuid.timestamp = uuid_info['timestamp'] + end + end # If the session is valid, register it with the framework and # notify any waiters we may have.