首页
社区
课程
招聘
[求助]谁解决了OD 导入liB 没序列号得问题?
发表于: 2011-4-6 00:39 6889

[求助]谁解决了OD 导入liB 没序列号得问题?

pjb 活跃值
1
2011-4-6 00:39
6889
到底谁解决了OD 导入liB 没序列号的问题?

查了论坛,没看到有正确回答的

我是想看 dinput.lib  和dinput8.lib 里在OD里调用的函数

1)用了IDA转MAP,LOAD map  失败!
2)用了DLL2lib   导入失败!
3)下了 directx8 sdK里面的 dinput.lib  和dinput8.lib。导入失败!

谁能帮帮我,谢谢!!

(还没用过VC++里面的转LIB工具)

[课程]FART 脱壳王!加量不加价!FART作者讲授!

收藏
免费 0
支持
分享
最新回复 (7)
雪    币: 6776
活跃值: (3694)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
关注,帮顶一下.
2011-4-8 09:21
0
雪    币: 91
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
就是vc 里面的转换工具好了 这个是python 的代码:

Here a sample way to create lib file for ollydbg ...
==============Copy Contents ====================
""" Usage
Copies those files from VC first:
    DUMPBIN.EXE
    LIB.EXE
    LINK.EXE
    MSPDB60.DLL(your symbol version)

Use following command to get the lib file for debug
    python dlltolib.py xxx.dll
"""

import sys, os, re

if len(sys.argv) < 2:
    print "** Plz spcecifies a dll file"
    sys.exit()

cwdpath = os.getcwd()
os.chdir(cwdpath)

dllfile = sys.argv.pop()
deffile = dllfile[0:-3] + 'def'
print '** Will create %s, %s after done, del manually' % (dllfile, deffile)

#dumpbin.exe /exports /out:g:\tool\ws2_32.def  ws2_32.dll
dumpcom = r'dumpbin.exe '
param = r'/exports /out:%s %s' % (deffile, dllfile)
print '** Begin to dump dll to def'
print dumpcom + param
os.system(dumpcom + param)
print '** Dump dll file to def file Done'

opendef = file(deffile, 'r')
startsign = re.compile(r'^\s*ordinal\s+hint\s+RVA\s+name', re.IGNORECASE)
endsign = re.compile(r'^\s*Summary\s*$', re.IGNORECASE)
fromflag = True # flag for checking whether has found function table
tempfunc = []

# read the fucntion from orignal def
exportfunc = opendef.readlines()
for line in exportfunc:
    if fromflag:
        if startsign.search(line):
            fromflag = False
    else:
        if endsign.search(line):
            break
        tempfunc.append(line.replace('\n', ''))

exportfunc = tempfunc[1:-1]
opendef.close()

# then produce to what I want to define def file
writefile = file(deffile, 'w')
heard = 'LIBRARY "%s"\n\n' % dllfile
section = 'EXPORTS\n'
# exportfunc[1] = '        22  73 00010BDE shutdown'
funcs = []
funcs.append(heard)
funcs.append(section)
for line in exportfunc:
    func = line.split()
    funcs.append('\t' + func[-1] + '  @' + func[0] + '\n')

writefile.writelines(funcs)
writefile.close()

libcmd = r'lib.exe '
param = r'/MACHINE:IX86 /def:%s' % deffile
print '** Begin to create lib file'
os.system(libcmd + param)
print '** Generate lib file for %s done' % dllfile
=========================================
2011-4-8 09:43
0
雪    币: 347
活跃值: (25)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
试一下,感谢
2011-4-8 10:47
0
雪    币: 190
活跃值: (70)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
这代码怎么用?
2011-8-18 15:06
0
雪    币: 1708
活跃值: (586)
能力值: ( LV15,RANK:670 )
在线值:
发帖
回帖
粉丝
6
使用符号文件也可以。
2011-8-18 15:53
0
雪    币: 370
活跃值: (15)
能力值: ( LV9,RANK:170 )
在线值:
发帖
回帖
粉丝
7
已经不适应python3了

file(   改为 open(

print ',,,,'  改为 print(',,,,,')
2011-8-19 11:12
0
雪    币: 284
活跃值: (16)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
8
虾米虾米?看都看不懂楼主要干啥?
2011-8-19 11:33
0
游客
登录 | 注册 方可回帖
返回
//