Use read_response class method

Looks like this was never implemented in other modules, but it collects
data from the socket in the usual get_once sort of way.
bug/bundler_fix
Tod Beardsley 2013-10-14 17:24:22 -05:00
parent 14be85ea5d
commit e8d0292118
No known key found for this signature in database
GPG Key ID: 1EFFB682ADB9F193
1 changed files with 5 additions and 3 deletions

View File

@ -164,11 +164,13 @@ class Metasploit3 < Msf::Auxiliary
wdsc_packet = packet.create
vprint_status("Sending #{architecture[0]} Client Unattend request ...")
response = dcerpc.call(0, wdsc_packet)
dcerpc.call(0, wdsc_packet, false)
timeout = datastore['Timeout'] || 3
response = Rex::Proto::DCERPC::Client.read_response(self.dcerpc.socket, timeout)
if (dcerpc.last_response != nil and dcerpc.last_response.stub_data != nil)
if (response and response.stub_data)
vprint_status('Received response ...')
data = dcerpc.last_response.stub_data
data = response.stub_data
# Check WDSC_Operation_Header OpCode-ErrorCode is success 0x000000
op_error_code = data.unpack('v*')[19]