Land #5097: resolve UUID namespace issues with pro
commit
84411be606
|
@ -196,12 +196,16 @@ class Msf::Payload::UUID
|
||||||
#
|
#
|
||||||
def self.find_platform_id(platform)
|
def self.find_platform_id(platform)
|
||||||
# Handle a PlatformList input by grabbing the first entry
|
# Handle a PlatformList input by grabbing the first entry
|
||||||
if platform.respond_to? :platforms
|
if platform.respond_to?(:platforms)
|
||||||
platform = platform.platforms.first.realname.downcase
|
platform = platform.platforms.first.realname.downcase
|
||||||
end
|
end
|
||||||
|
|
||||||
# Map a platform abbreviation to the real name
|
# Map a platform abbreviation to the real name
|
||||||
name = Msf::Platform::Abbrev[platform]
|
name = Msf::Platform.find_platform(platform)
|
||||||
|
if name && name.respond_to?(:realname)
|
||||||
|
name = name.realname.downcase
|
||||||
|
end
|
||||||
|
|
||||||
( Platforms.keys.select{ |k|
|
( Platforms.keys.select{ |k|
|
||||||
Platforms[k] == name
|
Platforms[k] == name
|
||||||
}.first || Platforms[0] ).to_i
|
}.first || Platforms[0] ).to_i
|
||||||
|
|
Loading…
Reference in New Issue