使用工具
Reflector.exe 用來查看.net代碼 這個就不用多說了它是學.net必備神器
Ildasm.exe:用來將dll,exe編譯為IL文件
ilasm.exe:用來將IL文件編譯回來dll或exe
EmEditor文本處理工具這個大家如果沒有我這有下載里面有注冊碼EmEditor.rar
2Ildasm和ilasm基本知識:
ilasm.exe與ildasm.exe的使用
首先打開cmd命令。cd 到 C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin
然后把要查看的 dll文件或者exe文件拉進來這里面(因為我們是要用命令,你直接打開ildasm.exe也可以找到各目錄打開)
比如 text.dll (里面有console.writeline("hello word"))
ildasm text.dll 打開dll 找到方法可以查看
ildasm text.dll /output:text.il 按回車就編譯好一個il文件(可用記事本打開並且編輯hello word保存)
然后用ilasm工具反匯編成 dll或者exe 文件
ilasm text 按回車自動查找text4.il 文件並且編譯成 text4.exe
或 ildasm text /dll 可以編譯成 text.dll 文件(記得先刪除原來的text4.dll)
1、用Ildasm.exe打開我們的程序,把程序倒出成IL文件
2、用EmEditor打開 找到我們要修改的方法
3、C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>ilasm.exe C:\IL\aa.il
用 ilasm.exe 將IL文件編譯回來dll或exe