From 6b25b1024ee5ad454fd76357c23c49d5287b21e3 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Wed, 14 Jul 2010 17:07:10 +0000 Subject: [PATCH] Always try to read the NB header first to get the length git-svn-id: file:///home/svn/framework3/trunk@9826 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/proto/smb/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/proto/smb/client.rb b/lib/rex/proto/smb/client.rb index d2146ece59..1faf57119d 100644 --- a/lib/rex/proto/smb/client.rb +++ b/lib/rex/proto/smb/client.rb @@ -43,8 +43,8 @@ EVADE = Rex::Proto::SMB::Evasions # Read a SMB packet from the socket def smb_recv - data = socket.get_once(-1, self.read_timeout) + data = socket.timed_read(4, self.read_timeout) if (data.nil? or data.length < 4) raise XCEPT::NoReply end