首页
社区
课程
招聘
[转帖][推荐]Python的decompile问题(1),(2),(3) by Team509
发表于: 2006-12-8 22:31 16093

[转帖][推荐]Python的decompile问题(1),(2),(3) by Team509

2006-12-8 22:31
16093
收藏
免费 7
支持
分享
最新回复 (27)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
26
decompile python 的问题(4)
编程相关技术 由ufwt 修改的for python 2.4的decompyle的版本在这里:http://www.team509.com/download/mydecompyle- 20061228.rar,原decompyle的test目录下的test cases用2.4编译后都可以成功的得到source code.

有任何问题,请联系wooshi:wooshi@gmail.com,

*marshal 2.4 pyc file
--ok
* dis 2.4 pyc file
--ok
* build 2.4 ast

* gen 2.4 source
* test dir in python 2.4 run
test_listComprehensions
list two level not support
use compiler module compile
decompile--ok
verfily
last ; <==> LOAD_CONST POP_TOP
use build in compile
* test suite
* log
* 2.4 how to gen pyc
ollypython 0.11 public
最近使用ollydbg时,感觉ollyscript太不顺手了,写了这么个东西,主要是自己用,所以很多地方没有仔细测试过,加上自己对ollydbg也不是太熟,所以错误肯定不少,大家将就用吧,有问题联系我:wooshi@gmail.com
文档资料没有,但你看看tests/*.py,再看看ollydbg plugin 的api说明,你就差不多会用了,赫赫.
在这里下载:http://www.team509.com/download/ollypython0.11.rar
下周我写写这种plugin的做法和公布源代码,希望大牛们可以给我指点指点.

readme.txt:
1. copy ollypy.py,ollyhelper.py to your python2.4's lib directory.
2. copy _ollypy.dll to your python2.4's DLLs directory
3. copy ollypython.dll,ollypy.dll to your ollydbg's plugin directory , when ollydbg haven't a plugin dir, put to ollydbg dir.
4. use tests/*.py and tests/crash.exe(being debugged ) to test the plugin .
5. see tests/*.py and ollydbg plugin api help v1.10 to get the funcs using method.

a sample:

from ollyhelper import *

eax = GetReg("EAX")

Addtolist(0,-1,"eax = %d "%(eax))

ss = GetReg("ss")

Addtolist(0,-1,"ss = 0x%x "%(ss))

cs = GetReg("cs")

Addtolist(0,-1,"cs = 0x%x "%(cs))

SetReg("eax", 0xffffffff)
eax = GetReg("EAX")

Addtolist(0,-1,"eax = 0x%x "%(eax))

asml,err = SetAsm(0x416719,"mov eax,[0044b500]")
size,asmd = GetAsm(0x416719)
Addtolist(0,-1,"asm = %s,size = %d"%(asmd,size))
memlist = Readmem(0x416719,50)
Addtolist(0,-1,"memlist = %s"%(memlist))
memlist[2]=0xff
code = ""
for i in range(len(memlist)):
code+=chr(memlist)

Writemem(0x416719, code)

Addtolist(0,-1,"code = %s"%(code))
2007-1-7 03:19
0
雪    币: 1448
活跃值: (1189)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
27
什么也不说.我来学来了
2007-1-7 16:05
0
雪    币: 427
活跃值: (412)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
28
这么一搞,以后解析器估计要混淆了。
2007-1-7 17:36
0
游客
登录 | 注册 方可回帖
返回
//