Small bug fix to allow pipeio on Novell
git-svn-id: file:///home/svn/framework3/trunk@4914 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
7630941970
commit
58a804e510
|
@ -50,7 +50,7 @@ EVADE = Rex::Proto::SMB::Evasions
|
||||||
data = ''
|
data = ''
|
||||||
fptr = offset
|
fptr = offset
|
||||||
ok = self.client.read(self.file_id, fptr, self.chunk_size)
|
ok = self.client.read(self.file_id, fptr, self.chunk_size)
|
||||||
while (ok['Payload'].v['DataLenLow'] > 0)
|
while (ok and ok['Payload'].v['DataLenLow'] > 0)
|
||||||
buff = ok.to_s.slice(
|
buff = ok.to_s.slice(
|
||||||
ok['Payload'].v['DataOffset'] + 4,
|
ok['Payload'].v['DataOffset'] + 4,
|
||||||
ok['Payload'].v['DataLenLow']
|
ok['Payload'].v['DataLenLow']
|
||||||
|
@ -60,8 +60,20 @@ EVADE = Rex::Proto::SMB::Evasions
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
fptr += ok['Payload'].v['DataLenLow']
|
fptr += ok['Payload'].v['DataLenLow']
|
||||||
ok = self.client.read(self.file_id, fptr, self.chunk_size)
|
|
||||||
|
begin
|
||||||
|
ok = self.client.read(self.file_id, fptr, self.chunk_size)
|
||||||
|
rescue XCEPT::ErrorCode => e
|
||||||
|
case e.error_code
|
||||||
|
when 0x00050001
|
||||||
|
# Novell fires off an access denied error on EOF
|
||||||
|
ok = nil
|
||||||
|
else
|
||||||
|
raise e
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return data
|
return data
|
||||||
else
|
else
|
||||||
ok = self.client.read(self.file_id, offset, length)
|
ok = self.client.read(self.file_id, offset, length)
|
||||||
|
|
Loading…
Reference in New Issue