Adds support for array arguments to Rex::Arch.endian(). This solves a problem where some exploits choose the wrong unescape method.

git-svn-id: file:///home/svn/framework3/trunk@5050 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2007-07-16 01:23:17 +00:00
parent 24aac8b5ae
commit 2fd4bf1579
1 changed files with 8 additions and 0 deletions

View File

@ -50,6 +50,11 @@ module Arch
# This routine reports the endianess of a given architecture
#
def self.endian(arch)
if ( arch.is_a?(::Array))
arch = arch[0]
end
case arch
when ARCH_X86
return ENDIAN_LITTLE
@ -60,6 +65,9 @@ module Arch
when ARCH_SPARC
return ENDIAN_BIG
end
p "XXXXXXXXXXXXXXXXXXX"
p arch
return ENDIAN_LITTLE
end