Give ruby Modules that wrap Metasploit modules a name

[#36737359]

active_support/dependencies cannot resolve missing constants in Metasploit
modules because the wrapper module is anonymous.  In order to make the
wrapper module non-anonymous, the module must be assigned to a constant.
Since we don't want modules colliding, the wrapper module needs a unique
name, so use the module lookup name to derive the proper nested module names
to namespace the wrapper module.  All derived modules are nested under
Msf::Modules.  The name derivation handles invalid characters for constant
names such as digits as the first character or non-alphanumeric character.
The invalid constant name characters are converted to their hex value and
prefixed with X, so '-' in a name become 'X2d'.
This commit is contained in:
Luke Imhoff
2012-09-27 12:52:09 -05:00
parent 8b8da0b370
commit 8a2dc0a09f
2 changed files with 65 additions and 1 deletions
+6
View File
@@ -1,3 +1,7 @@
# Rubymine project directory
.idea
# Mac OS X files
.DS_Store
data/meterpreter/ext_server_pivot.dll
data/meterpreter/ext_server_pivot.x64.dll
external/source/meterpreter/java/bin
@@ -5,6 +9,8 @@ external/source/meterpreter/java/build
external/source/meterpreter/java/extensions
external/source/javapayload/bin
external/source/javapayload/build
# Packaging directory
pkg
tags
*.swp
*.orig