# 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([])