使用python程式設計,解析PE檔案(全過程)
阿新 • • 發佈:2019-01-02
1、VS2017下安裝python環境。
2、搜尋“python解析PE,脫殼,破解”。上網相似教程很多,反覆看、反覆熟悉。
3、下載一個python庫:pefile 。
可參考:https://github.com/erocarrera/pefile/releases?after=pefile-1.2.10-118
https://bbs.pediy.com/thread-89838.htm
4、安裝python庫:pefile。 microsoft官網幫助文件寫的很清楚: https://docs.microsoft.com/en-us/visualstudio/python/vs-tutorial-01-05
提示:目前有pefile和pefile2兩個版本的庫。筆者安裝的是2017-11-05更行版pefile,很慢,另外也有網友表示pefile2比pefile快很多。具體什麼原因暫且掛起,後續深究。網友部落格:http://blog.csdn.net/davidsu33/article/details/51881327
5、主要是三行程式碼:
import pefile
pe = pefile.PE('E:\\TestTool\\LaoMaoTao.exe')
print(pe)