Moved away from eval, and to const_get stylies

git-svn-id: file:///home/svn/incoming/trunk@2543 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Spoon M 2005-06-02 02:03:37 +00:00
parent dbfd24b647
commit ac95849255
1 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,9 @@ class Client
return false
end
ext = eval("Rex::Post::Meterpreter::Extensions::" + name + "::" + name + ".new(self)")
# XXX might want to be safer and catch the exception here?
# maybe not since we are just going to reraise right away...
ext = Rex::Post::Meterpreter::Extensions.const_get(name).const_get(name).new(self)
self.ext.aliases[ext.name] = ext