Include Msf::Post::Windows::Error
parent
ec8d24c376
commit
d5e196707d
|
@ -8,6 +8,7 @@ class Metasploit3 < Msf::Post
|
|||
include Msf::Post::File
|
||||
include Msf::Post::Windows::Priv
|
||||
include Msf::Post::Windows::Services
|
||||
include Msf::Post::Windows::Error
|
||||
|
||||
START_TYPE = {
|
||||
"demand" => "SERVICE_DEMAND_START",
|
||||
|
@ -81,11 +82,11 @@ class Metasploit3 < Msf::Post
|
|||
if inst
|
||||
ss = service_start(name)
|
||||
case ss
|
||||
when Windows::Error::SUCCESS;
|
||||
when Windows::Error::SUCCESS
|
||||
print_good("Driver loaded successfully.")
|
||||
when Windows::Error::SERVICE_ALREADY_RUNNING;
|
||||
when Windows::Error::SERVICE_ALREADY_RUNNING
|
||||
print_error("Service already started.")
|
||||
when Windows::Error::SERVICE_DISABLED;
|
||||
when Windows::Error::SERVICE_DISABLED
|
||||
print_error("Service disabled.")
|
||||
else
|
||||
print_error("There was an error starting the service.")
|
||||
|
|
Loading…
Reference in New Issue