mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-12 11:52:01 +01:00
-c option conflicts with sessions own options when ran from the sessions command changed to -cl
git-svn-id: file:///home/svn/framework3/trunk@9505 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
843d632d55
commit
f1e91fe0f5
@ -7,7 +7,7 @@
|
||||
# $Revision$
|
||||
|
||||
################## Variable Declarations ##################
|
||||
session = client
|
||||
@client = client
|
||||
|
||||
# Setting Arguments
|
||||
@@exec_opts = Rex::Parser::Arguments.new(
|
||||
@ -22,13 +22,13 @@ help = 0
|
||||
|
||||
################## Function Declarations ##################
|
||||
# Function for running a list of commands stored in a array, returs string
|
||||
def list_con_exec(session,cmdlst)
|
||||
def list_con_exec(cmdlst)
|
||||
print_status("Running Command List ...")
|
||||
cmdout = ""
|
||||
cmdlst.each do |cmd|
|
||||
begin
|
||||
print_status "\tRunning command #{cmd}"
|
||||
session.console.run_single(cmd)
|
||||
@client.console.run_single(cmd)
|
||||
rescue ::Exception => e
|
||||
print_status("Error Running Command #{cmd}: #{e.class} #{e}")
|
||||
end
|
||||
@ -67,7 +67,7 @@ end
|
||||
if args.length == 0 or help == 1
|
||||
usage
|
||||
else
|
||||
list_con_exec(session,commands)
|
||||
list_con_exec(commands)
|
||||
raise Rex::Script::Completed
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user