2005-10-01 05:55:15 +00:00
|
|
|
module Rex
|
2005-11-02 23:03:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# This module provides generalized methods for performing operations that are
|
|
|
|
# architecture specific. Furthermore, the modules contained within this
|
|
|
|
# module provide features that are specific to a given architecture.
|
|
|
|
#
|
|
|
|
###
|
2005-10-01 05:55:15 +00:00
|
|
|
module Arch
|
|
|
|
|
|
|
|
require 'rex/arch/x86'
|
2005-10-11 22:37:41 +00:00
|
|
|
require 'rex/arch/sparc'
|
2005-10-01 05:55:15 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# This routine adjusts the stack pointer for a given architecture
|
|
|
|
#
|
|
|
|
def self.adjust_stack_pointer(arch, adjustment)
|
|
|
|
case arch
|
|
|
|
when /x86/
|
2005-11-11 01:22:03 +00:00
|
|
|
Rex::Arch::X86.adjust_reg(Rex::Arch::X86::ESP, adjustment)
|
2005-10-01 05:55:15 +00:00
|
|
|
else
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|