[+] script: switch x86(WOW64) <-> x64 processor mode. And execute commands (if specified)

git-svn-id: https://pykd.svn.codeplex.com/svn@70198 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\EreTIk_cp 2011-10-04 08:11:57 +00:00
parent c9b63b1bdb
commit 43aa5d787c

18
samples/wow64sw.py Normal file
View File

@ -0,0 +1,18 @@
"""
Switch x86(WOW64) <-> x64 processor mode
And execute commands (if specified)
"""
import sys
from pykd import *
if __name__ == "__main__":
if getProcessorType() == "X64":
setProcessorMode( {"X64": "X86", "X86": "X64"}[ getProcessorMode() ] )
if len(sys.argv) > 1:
command = ""
for arg in sys.argv[1:]:
command = command + " " + arg
dprintln( dbgCommand(command) )
else:
dprintln("For \"X64\" processor only")