show cmd if -c is used, add quotes on cmdline
git-svn-id: file:///home/svn/framework3/trunk@11083 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
66d0012200
commit
4be4c763c8
|
@ -75,6 +75,10 @@ upload_fn = nil
|
|||
# Must have at least one of -c or -u
|
||||
usage if not cmd and not upload_fn
|
||||
|
||||
if cmd
|
||||
print_status("Using command: #{cmd}")
|
||||
end
|
||||
|
||||
#
|
||||
# Upload the payload command if needed
|
||||
#
|
||||
|
@ -214,7 +218,7 @@ end
|
|||
#
|
||||
taskname = Rex::Text.rand_text_alphanumeric(8+rand(8))
|
||||
print_status("Creating task: #{taskname}")
|
||||
cmdline = "schtasks.exe /create /tn #{taskname} /tr #{cmd} /sc monthly /f"
|
||||
cmdline = "schtasks.exe /create /tn #{taskname} /tr \"#{cmd}\" /sc monthly /f"
|
||||
exec_schtasks(cmdline, "create the task")
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue