Skip to content

Commit d5e1967

Browse files
committed
Include Msf::Post::Windows::Error
1 parent ec8d24c commit d5e1967

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/post/windows/manage/driver_loader.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class Metasploit3 < Msf::Post
88
include Msf::Post::File
99
include Msf::Post::Windows::Priv
1010
include Msf::Post::Windows::Services
11+
include Msf::Post::Windows::Error
1112

1213
START_TYPE = {
1314
"demand" => "SERVICE_DEMAND_START",
@@ -81,11 +82,11 @@ def run
8182
if inst
8283
ss = service_start(name)
8384
case ss
84-
when Windows::Error::SUCCESS;
85+
when Windows::Error::SUCCESS
8586
print_good("Driver loaded successfully.")
86-
when Windows::Error::SERVICE_ALREADY_RUNNING;
87+
when Windows::Error::SERVICE_ALREADY_RUNNING
8788
print_error("Service already started.")
88-
when Windows::Error::SERVICE_DISABLED;
89+
when Windows::Error::SERVICE_DISABLED
8990
print_error("Service disabled.")
9091
else
9192
print_error("There was an error starting the service.")

0 commit comments

Comments
 (0)