remove superfluous sleeps, simplify logic

GSoC/Meterpreter_Web_Console
Brent Cook 2018-06-25 17:24:43 -05:00 committed by Jacob Robles
parent 4b767efd6c
commit c06f13b33e
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
2 changed files with 36 additions and 41 deletions

View File

@ -142,7 +142,7 @@ module Exploit::Remote::SMB::Client::Psexec
if svc_handle.nil?
print_error("No service handle retrieved")
return false
else
end
if service_description
vprint_status("Changing service description...")
@ -186,10 +186,8 @@ module Exploit::Remote::SMB::Client::Psexec
svc_client.closehandle(svc_handle)
end
end
end
if disconnect
sleep(1)
simple.disconnect("\\\\#{datastore['RHOST']}\\IPC$")
end

View File

@ -260,8 +260,6 @@ require 'rex/proto/smb/exceptions'
raw_response = ''
sleep 3
begin
raw_response = self.read()
rescue ::EOFError
@ -272,7 +270,6 @@ require 'rex/proto/smb/exceptions'
raise Rex::Proto::DCERPC::Exceptions::NoResponse
end
self.last_response = Rex::Proto::DCERPC::Response.new(raw_response)
if self.last_response.type == 3