From ac958492558e7b9afc7e029bd7147fb9502cf7f6 Mon Sep 17 00:00:00 2001 From: Spoon M Date: Thu, 2 Jun 2005 02:03:37 +0000 Subject: [PATCH] Moved away from eval, and to const_get stylies git-svn-id: file:///home/svn/incoming/trunk@2543 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/post/meterpreter/client.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rex/post/meterpreter/client.rb b/lib/rex/post/meterpreter/client.rb index 56ac250beb..f3227c692c 100644 --- a/lib/rex/post/meterpreter/client.rb +++ b/lib/rex/post/meterpreter/client.rb @@ -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