From af43b6ca177db5a5b8b4cbba33f6f7d72cb4e254 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 2 Jul 2018 15:19:19 -0500 Subject: [PATCH] don't call print_error from rex context, use elog instead --- lib/rex/proto/dcerpc/svcctl/packet.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/rex/proto/dcerpc/svcctl/packet.rb b/lib/rex/proto/dcerpc/svcctl/packet.rb index fa6fb53b9e..e48a45d3ff 100644 --- a/lib/rex/proto/dcerpc/svcctl/packet.rb +++ b/lib/rex/proto/dcerpc/svcctl/packet.rb @@ -56,7 +56,7 @@ class Client end end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error getting scm handle: #{e}") + elog("Error getting scm handle: #{e}") end [scm_handle, scm_status] @@ -120,7 +120,7 @@ class Client begin response = dcerpc_client.call(CREATE_SERVICE_W, stubdata) rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error creating service: #{e}") + elog("Error creating service: #{e}") end if response @@ -152,7 +152,7 @@ class Client response = dcerpc_client.call(CHANGE_SERVICE_CONFIG2_W, stubdata) # ChangeServiceConfig2 svc_status = error_code(response) rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error changing service description : #{e}") + elog("Error changing service description : #{e}") end svc_status @@ -172,7 +172,7 @@ class Client svc_status = error_code(response) end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error closing service handle: #{e}") + elog("Error closing service handle: #{e}") end svc_status @@ -198,7 +198,7 @@ class Client end end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error opening service handle: #{e}") + elog("Error opening service handle: #{e}") end svc_handle @@ -222,7 +222,7 @@ class Client svc_status = error_code(response) end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error starting service: #{e}") + elog("Error starting service: #{e}") end svc_status @@ -252,7 +252,7 @@ class Client svc_status = error_code(response[28,4]) end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error controlling service: #{e}") + elog("Error controlling service: #{e}") end svc_status @@ -271,7 +271,7 @@ class Client svc_status = error_code(response) end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error deleting service: #{e}") + elog("Error deleting service: #{e}") end svc_status @@ -295,7 +295,7 @@ class Client ret = 2 end rescue Rex::Proto::DCERPC::Exceptions::Fault => e - print_error("Error deleting service: #{e}") + elog("Error deleting service: #{e}") end ret