Force LITTLE_ENDIAN by default
parent
3b1042b903
commit
eb8d4b6772
|
@ -4,6 +4,9 @@ require 'spec_helper'
|
|||
require 'rex/ole'
|
||||
|
||||
describe Rex::OLE::CLSID do
|
||||
before(:each) do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
let(:sample_clsid) { "\x00\x11\x22\x33\x44\x55\x66\x77\x88\x99\xaa\xbb\xcc\xdd\xee\xff" }
|
||||
|
||||
|
@ -35,7 +38,6 @@ describe Rex::OLE::CLSID do
|
|||
|
||||
describe "#to_s" do
|
||||
it "returns printable clsid" do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
expect(clsid.to_s).to eq('33221100-5544-7766-8899-aabbccddeeff')
|
||||
end
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ require 'spec_helper'
|
|||
require 'rex/ole'
|
||||
|
||||
describe Rex::OLE::DIFAT do
|
||||
before(:each) do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
let(:storage) do
|
||||
Rex::OLE::Storage.new
|
||||
|
|
|
@ -4,6 +4,9 @@ require 'spec_helper'
|
|||
require 'rex/ole'
|
||||
|
||||
describe Rex::OLE::DirEntry do
|
||||
before(:each) do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
let(:storage) do
|
||||
Rex::OLE::Storage.new
|
||||
|
|
|
@ -4,6 +4,9 @@ require 'spec_helper'
|
|||
require 'rex/ole'
|
||||
|
||||
describe Rex::OLE::Header do
|
||||
before(:each) do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
subject(:header) do
|
||||
described_class.new
|
||||
|
@ -240,7 +243,7 @@ describe Rex::OLE::Header do
|
|||
hdr << 'A' * 16 # @_clid
|
||||
hdr << 'BB' # @_uMinorVersion
|
||||
hdr << 'CC' # @_uMajorVersion
|
||||
hdr << 'DD' # @_uByteOrder
|
||||
hdr << "\xfe\xff" # @_uByteOrder
|
||||
hdr << 'EE' # @_uSectorShift
|
||||
hdr << 'FF' # @_uMiniSectorShift
|
||||
hdr << '123456' # padding
|
||||
|
@ -275,7 +278,7 @@ describe Rex::OLE::Header do
|
|||
|
||||
it "sets byte order from input" do
|
||||
header.read(correct_fd)
|
||||
expect(header.instance_variable_get(:@_uByteOrder)).to eq(0x4444)
|
||||
expect(header.instance_variable_get(:@_uByteOrder)).to eq(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
it "sets the size of sectors from input" do
|
||||
|
|
|
@ -4,6 +4,9 @@ require 'spec_helper'
|
|||
require 'rex/ole'
|
||||
|
||||
describe Rex::OLE::MiniFAT do
|
||||
before(:each) do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
let(:storage) do
|
||||
Rex::OLE::Storage.new
|
||||
|
|
|
@ -4,6 +4,9 @@ require 'spec_helper'
|
|||
require 'rex/ole'
|
||||
|
||||
describe Rex::OLE::Util do
|
||||
before(:each) do
|
||||
Rex::OLE::Util.set_endian(Rex::OLE::LITTLE_ENDIAN)
|
||||
end
|
||||
|
||||
describe ".Hexify32array" do
|
||||
subject(:hex_array) { described_class.Hexify32array(arr) }
|
||||
|
|
Loading…
Reference in New Issue