All pastes #133152 Raw Edit

Cody Brocious

public python v1 · immutable
#133152 ·published 2006-08-15 18:06 UTC
rendered paste body
# Copyright 2006 Falling Leaf Systems, LLC.# Refer to LICENSE in the root directory.import alkydebugimport timeimport sysdef main(args):	process = alkydebug.Process(commandLine='./foo')	debug = alkydebug.Debug(process)	debug.start()	old = debug.process.peekMemory(0x006FBAA3L, 2)	if old == '\xff\xd0':		if not debug.process.pokeMemory(0x006FBAA3L, '\x90\x90'):			print 'Failed poking?!'			sys.exit()		if old == debug.process.peekMemory(0x006FBAA3L, 2):			print 'Memory didn\'t write.'	elif not old:		print 'Could not read memory.'	else:		print 'Memory not what was expected.'	debug.process.cont()main([])