From a44358df674b33f7859a154d0913394b7e29c2b5 Mon Sep 17 00:00:00 2001 From: Stephen Fewer Date: Thu, 4 Mar 2010 19:31:36 +0000 Subject: [PATCH] Simple fix for #1013 and the migration permission error message. git-svn-id: file:///home/svn/framework3/trunk@8714 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/post/meterpreter/client_core.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rex/post/meterpreter/client_core.rb b/lib/rex/post/meterpreter/client_core.rb index df134886af..c22d6d8a13 100644 --- a/lib/rex/post/meterpreter/client_core.rb +++ b/lib/rex/post/meterpreter/client_core.rb @@ -184,17 +184,17 @@ class ClientCore < Extension # We cant migrate into a process that does not exist. if( process == nil ) - raise ArgumentError, "Cannot migrate into non existant process", caller + raise RuntimeError, "Cannot migrate into non existant process", caller end # We cant migrate into a process that we are unable to open - if( process['arch'] == nil ) - raise ArgumentError, "Cannot migrate into this process (insufficient privileges)", caller + if( process['arch'] == nil or process['arch'].empty? ) + raise RuntimeError, "Cannot migrate into this process (insufficient privileges)", caller end # And we also cant migrate into our own current process... if( process['pid'] == client.sys.process.getpid ) - raise ArgumentError, "Cannot migrate into current process", caller + raise RuntimeError, "Cannot migrate into current process", caller end # Create a new payload stub