Skip to content

Commit 9bce08b

Browse files
author
HD Moore
committed
This change avoids namespace collisions around the Abbrev class
1 parent 38a77c9 commit 9bce08b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/msf/core/payload/uuid.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,11 @@ def self.find_platform_id(platform)
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)