IL文件修改入门篇

注:原文地址:http://www.cnblogs.com/midea0978/articles/81071.html

==================================
Object:
   掌握简单的IL文件处理知识
   能够熟练运用ildasm,ilasm工具
==================================
1.编写简单的hello.cs

2.编译源代码

3.反编译hello.exe,命令如下:
ildasm hello.exe /out=hello.il

4.打开hello.il文件,找到下面语句
IL_0000:  ldstr      "Hello World!"
修改为
IL_0000:  ldstr      "Hello World! A Cracked Version."
保存文件。

5.编译il文件
ilasm /res:hello.res hello.il /out:hellocracked.exe
--------------------------------------------------------

Microsoft (R) .NET Framework IL Assembler.  Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Assembling 'hello.il' , no listing file, to EXE --> 'hellocracked.exe'
Source file is ANSI

Assembled method HelloWorld::Main
Assembled method HelloWorld::.ctor
Creating PE file

Emitting members:
Global
Class 1 Methods: 2;
Writing PE file
Operation completed successfully

-----------------------------------------------------------
成功编译。

5.运行hellocracked.exe,结果如下:
Hello World! A Cracked Version.

好的,你已经掌握了基本的IL文件修改知识了。

相关源代码:

http://files.cnblogs.com/midea0978/dotnet-IL-guide.rar

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值