Fix string handling
git-svn-id: file:///home/svn/framework3/trunk@7160 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
cd2968a32a
commit
ce9bfec34f
|
@ -368,6 +368,7 @@ module Exploit::Remote::MSSQL
|
|||
if(
|
||||
str[0,5] == "\x02\x00\x21\x00\x27" or # varchar
|
||||
str[0,5] == "\x02\x00\x08\x00\x27" or
|
||||
str[0,5] == "\x02\x00\x01\x00\x27" or
|
||||
str[0,5] == "\x12\x00\x08\x00\x27" or
|
||||
str[0,5] == "\x12\x00\x09\x00\x27" or
|
||||
str[0,5] == "\x04\x00\x09\x00\x25" or # varbinary
|
||||
|
@ -469,11 +470,11 @@ module Exploit::Remote::MSSQL
|
|||
|
||||
when :hex
|
||||
len = data.slice!(0,1).unpack('C')[0]
|
||||
row << (len > 0) ? data.slice!(0,len) : ''
|
||||
row << ((len > 0) ? data.slice!(0,len) : '')
|
||||
|
||||
when :string
|
||||
len = data.slice!(0,1).unpack('C')[0]
|
||||
row << (len > 0) ? data.slice!(0,len) : ''
|
||||
row << ((len > 0) ? data.slice!(0,len) : '')
|
||||
|
||||
when :datetime
|
||||
# XXX: convert to unix time
|
||||
|
@ -486,11 +487,11 @@ module Exploit::Remote::MSSQL
|
|||
|
||||
when :image
|
||||
len = data.slice!(0,1).unpack('C')[0]
|
||||
row << (len > 0) ? data.slice!(0,len).unpack("H*")[0] : ''
|
||||
row << ((len > 0) ? data.slice!(0,len).unpack("H*")[0] : '')
|
||||
|
||||
when :binary
|
||||
len = data.slice!(0,1).unpack('C')[0]
|
||||
row << (len > 0) ? data.slice!(0,len).unpack("H*")[0] : ''
|
||||
row << ((len > 0) ? data.slice!(0,len).unpack("H*")[0] : '')
|
||||
|
||||
when :unknown
|
||||
len = data.slice!(0,1).unpack('C')[0]
|
||||
|
|
Loading…
Reference in New Issue