node/lib/metasm/metasm/os/linux.rb
def hack_x64_32
		log "WARNING: debugging a 64bit process from a 32bit debugger is a very bad idea !"
		ia32 = Ia32.new
		@cpu.instance_variable_set('@dbg_register_pc', ia32.dbg_register_pc)
		@cpu.instance_variable_set('@dbg_register_sp', ia32.dbg_register_sp)
		@cpu.instance_variable_set('@dbg_register_flags', ia32.dbg_register_flags)
		@cpu.instance_variable_set('@dbg_register_list', ia32.dbg_register_list)
		@cpu.instance_variable_set('@dbg_register_size', ia32.dbg_register_size)
	end
# We're a 32bit process debugging a 64bit target
# the ptrace kernel interface we use only allow us a 32bit-like target access
# With this we advertize the cpu as having eax..edi registers (the only one we
# can access), while still decoding x64 instructions (whose addr < 4G)
We're a 32bit process debugging a 64bit target
the ptrace kernel interface we use only allow us a 32bit-like target access
With this we advertize the cpu as having eax..edi registers (the only one we
can access), while still decoding x64 instructions (whose addr < 4G)
We ' re a 32bit process debugging a 64bit target the ptrace kernel interface we use only allow us a 32bit - like target access With this we advertize the cpu as having eax .. edi registers ( the only one we can access ) while still decoding x64 instructions ( whose addr < 4G )
def hack_x64_32
		log "WARNING: debugging a 64bit process from a 32bit debugger is a very bad idea !"
		ia32 = Ia32.new
		@cpu.instance_variable_set('@dbg_register_pc', ia32.dbg_register_pc)
		@cpu.instance_variable_set('@dbg_register_sp', ia32.dbg_register_sp)
		@cpu.instance_variable_set('@dbg_register_flags', ia32.dbg_register_flags)
		@cpu.instance_variable_set('@dbg_register_list', ia32.dbg_register_list)
		@cpu.instance_variable_set('@dbg_register_size', ia32.dbg_register_size)
	end
def hack_x64_32 log "WARNING: debugging a 64bit process from a 32bit debugger is a very bad idea !" ia32 = Ia32 . new @cpu . instance_variable_set ( '@dbg_register_pc' , ia32 . dbg_register_pc ) @cpu . instance_variable_set ( '@dbg_register_sp' , ia32 . dbg_register_sp ) @cpu . instance_variable_set ( '@dbg_register_flags' , ia32 . dbg_register_flags ) @cpu . instance_variable_set ( '@dbg_register_list' , ia32 . dbg_register_list ) @cpu . instance_variable_set ( '@dbg_register_size' , ia32 . dbg_register_size ) end
We're a 32bit process debugging a 64bit target
the ptrace kernel interface we use only allow us a 32bit-like target access
With this we advertize the cpu as having eax..edi registers (the only one we
can access), while still decoding x64 instructions (whose addr < 4G)
We ' re a 32bit process debugging a 64bit target the ptrace kernel interface we use only allow us a 32bit - like target access With this we advertize the cpu as having eax .. edi registers ( the only one we can access ) while still decoding x64 instructions ( whose addr < 4G )