Skip to content

Commit 84411be

Browse files
author
Brent Cook
committed
Land rapid7#5097: resolve UUID namespace issues with pro
2 parents bac3c80 + 8cc48e0 commit 84411be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/msf/core/payload/uuid.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,16 @@ def self.parse_uri(uri)
196196
#
197197
def self.find_platform_id(platform)
198198
# Handle a PlatformList input by grabbing the first entry
199-
if platform.respond_to? :platforms
199+
if platform.respond_to?(:platforms)
200200
platform = platform.platforms.first.realname.downcase
201201
end
202202

203203
# Map a platform abbreviation to the real name
204-
name = Msf::Platform::Abbrev[platform]
204+
name = Msf::Platform.find_platform(platform)
205+
if name && name.respond_to?(:realname)
206+
name = name.realname.downcase
207+
end
208+
205209
( Platforms.keys.select{ |k|
206210
Platforms[k] == name
207211
}.first || Platforms[0] ).to_i

0 commit comments

Comments
 (0)