From d5e196707d3dedc42b0b1ccfaf341bc05a8c1dd5 Mon Sep 17 00:00:00 2001 From: jvazquez-r7 Date: Thu, 2 Jan 2014 13:41:37 -0600 Subject: [PATCH] Include Msf::Post::Windows::Error --- modules/post/windows/manage/driver_loader.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/post/windows/manage/driver_loader.rb b/modules/post/windows/manage/driver_loader.rb index e01c286a77..641499ab1e 100644 --- a/modules/post/windows/manage/driver_loader.rb +++ b/modules/post/windows/manage/driver_loader.rb @@ -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.")