remove superfluous sleeps, simplify logic
parent
4b767efd6c
commit
c06f13b33e
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue