Fixes #441. Unpack the version in a way that works with 1.9

git-svn-id: file:///home/svn/framework3/trunk@7319 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-11-02 15:09:54 +00:00
parent c0758f7bc6
commit c0a0507fdf
4 changed files with 90 additions and 86 deletions

View File

@ -24,3 +24,4 @@ class Exploit::Remote::DCERPC::UnitTest < Test::Unit::TestCase
end
end

View File

@ -141,7 +141,7 @@ module Exploit::Remote::DCERPC_EPM
if (i == 1)
info[:uuid] = Rex::Proto::DCERPC::UUID.uuid_unpack(buf[soff+1, 16])
info[:vers] = "#{buf[soff+17]}.#{buf[soff+18]}"
info[:vers] = buf[soff+17,2].unpack('CC').map{|s| s.to_s}.join(".")
end
if (i > 3)
@ -218,3 +218,4 @@ module Exploit::Remote::DCERPC_EPM
end
end

View File

@ -35,3 +35,4 @@ module Exploit::Remote::DCERPC_LSA
end
end

View File

@ -49,7 +49,7 @@ module Exploit::Remote::DCERPC_MGMT
ifidx = 0
while(ifidx < ifcount * 20)
intf = Rex::Proto::DCERPC::UUID.uuid_unpack(iflists[ifidx, 16])
vers = "#{iflists[ifidx + 16, 2].unpack('v')[0]}.#{iflists[ifidx + 18, 2].unpack('v')[0]}"
vers = iflists[ifidx + 16,4].unpack('vv').map{|c| c.to_s}.join('.')
res << [intf, vers]
ifidx += 20
end
@ -201,3 +201,4 @@ module Exploit::Remote::DCERPC_MGMT
end
end