From 08aac797f5ee4fe24b22e62cb8c8d5449df36971 Mon Sep 17 00:00:00 2001 From: Carlos Perez Date: Sat, 10 Jul 2010 13:44:26 +0000 Subject: [PATCH] resolved function name conflict with mixin git-svn-id: file:///home/svn/framework3/trunk@9762 4d416f70-5f16-0410-b530-b9f4589650da --- scripts/meterpreter/uploadexec.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/meterpreter/uploadexec.rb b/scripts/meterpreter/uploadexec.rb index 9eb57b2509..7c5d04a8ce 100644 --- a/scripts/meterpreter/uploadexec.rb +++ b/scripts/meterpreter/uploadexec.rb @@ -14,6 +14,7 @@ session = client def usage() print_line "UploadExec -- upload a script or executable and run it" print_line(@@exec_opts.usage) + raise Rex::Script::Completed end def upload(session,file,trgloc = "") @@ -44,7 +45,7 @@ def upload(session,file,trgloc = "") end #Function for executing a list of commands -def cmd_exec(session,cmdexe,opt,verbose) +def cmd_on_trgt_exec(session,cmdexe,opt,verbose) r='' session.response_timeout=120 if verbose == 1 @@ -80,7 +81,7 @@ end #parsing of Options file = "" -cmdopt = "" +cmdopt = nil helpcall = 0 path = "" verbose = 0 @@ -103,12 +104,12 @@ remove = 0 } -if file == "" || cmdopt == nil || path == nil +if args.length == 0 || helpcall == 1 usage end print_status("Running Upload and Execute Meterpreter script....") exec = upload(session,file,path) -cmd_exec(session,exec,cmdopt,verbose) +cmd_on_trgt_exec(session,exec,cmdopt,verbose) if remove == 1 print_status("\tDeleting #{exec}") m_unlink(session, exec)