Actually, don't really have a good reason for that exception handling anymore. I think.
parent
0eb3b5a49b
commit
608a5586b2
|
@ -164,12 +164,7 @@ class Metasploit3 < Msf::Post
|
|||
print_status("Creating task: #{taskname}")
|
||||
cmdline = "schtasks.exe /create /tn #{taskname} /tr \"#{cmd}\" /sc monthly /f"
|
||||
# print_debug("Will Execute:\n\t#{cmdline}")
|
||||
begin
|
||||
exec_schtasks(cmdline, "create the task")
|
||||
rescue ::Exception => e
|
||||
print_error(e.to_s)
|
||||
return
|
||||
end
|
||||
exec_schtasks(cmdline, "create the task")
|
||||
|
||||
#
|
||||
# Read the contents of the newly creates task file
|
||||
|
|
Loading…
Reference in New Issue