https://github.com/0xd4d/dnSpy

下载压缩包之后,解压,发现目录里面有3个exe文件

需要用管理员运行dnSpy.exe,然后打开exe文件,设置好断点,然后start

使用技巧

edit method

在左侧的导航栏,找到某个类里面的某个方法,右键,会有2个edit method

1. 白色的是重命名方法,会同步修改reference处的引用

2. 绿色的是修改方法体,也就是方法里面的内容

analyze

找到某一个方法,右键analyze

show compiler generated code

这个可以用来查看async关键字生成的state machine的代码

右键菜单的Merge with Assembly

假如你打开了HearthBuddy的exe,现在想要引用另外一个dll文件,那就可以直接merge with assembly。另外一个dll文件里面的类,会被直接导入到HearthBuddy.exe里面

Reference another assembly

https://github.com/0xd4d/dnSpy/issues/357

应该用第一个图标,浏览

不支持async和await

关于async的反编译

https://github.com/0xd4d/dnSpy/issues/687#issuecomment-354990427

await is just synthetic sugar for what you see in the decompiled code. Usually ILSpy converts this back to what a programmer would normally write, but the version that dnSpy uses didn't have that implemented yet. You can find all implemented language features for the latest version of ILSpy here, but keep in mind that dnSpy still uses ILSpy 2.x, not 3.x.

取消反编译async methods

// Triton.Bot.Logic.Bots.DefaultBot.DefaultBot
// Token: 0x060013A3 RID: 5027 RVA: 0x000BD93C File Offset: 0x000BBB3C
private Task method_49(TournamentScene tournamentScene_0)
{
DefaultBot.Struct88 @struct;
@struct.defaultBot_0 = this;
@struct.tournamentScene_0 = tournamentScene_0;
@struct.asyncTaskMethodBuilder_0 = AsyncTaskMethodBuilder.Create();
@struct.int_0 = -;
AsyncTaskMethodBuilder asyncTaskMethodBuilder_ = @struct.asyncTaskMethodBuilder_0;
asyncTaskMethodBuilder_.Start<DefaultBot.Struct88>(ref @struct);
return @struct.asyncTaskMethodBuilder_0.Task;
}

找到Struct88的定义,然后找到里面的MoveNext方法,右键edit method body

然后找到https://www.cnblogs.com/chucklu/p/11184577.html 263行以及672行,进行替换。

Search in framework assemblies

dnSpy的更多相关文章

  1. .net 反编译利器 dnspy

    Binaries Latest release: https://github.com/0xd4d/dnSpy/releases Latest build (possibly unstable): h ...

  2. [C#]使用dnSpy对目标程序(EXE或DLL)进行反编译修改并编译运行

    本文为原创文章.源代码为原创代码,如转载/复制,请在网页/代码处明显位置标明原文名称.作者及网址,谢谢! 本文使用的工具下载地址为: https://github.com/cnxy/dnSpy/arc ...

  3. .NET 反编译调试神器:dnSpy了解一下

    如果客户环境出了问题,而又无法快速定位问题,可以借助dnSpy进行反编译调试跟踪. 可前往dnSpy官网下载或直接从我的分享链接下载(内置包含.NET Framework 4.7.1,若运行提示需要安 ...

  4. dnSpy 强大的.Net反编译软件

    作者:D.泡沫 一说起.net的反编译软件,大家首先想到的就是Reflector,ILSpy,dotPeek等等.而dnSpy同样是一款优秀的反编译软件,同时它是开源免费的.官方的描述是: dnSpy ...

  5. 神器如 dnSpy,无需源码也能修改 .NET 程序

    dnSpy 是 0xd4d 开发的 .NET 程序调试神器. 说它是神器真的毫不为过!它能在完全没有源码的情况下即时调试程序,甚至还能修改程序!本文讲向大家介绍如何使用 dnSpy 修改 .NET 程 ...

  6. 使用dnSpy对目标程序(EXE或DLL)进行反编译修改并编译运行

    本文为原创文章.源代码为原创代码,如转载/复制,请在网页/代码处明显位置标明原文名称.作者及网址,谢谢! 本文使用的工具下载地址为: https://github.com/cnxy/dnSpy/arc ...

  7. 游戏反编译工具dnSpy

    dnSpy使用的工具下载地址为: https://github.com/cnxy/dnSpy/archive/v4.0.0.zip 或 dnSpy官方下载地址: https://github.com/ ...

  8. dnspy的详细配置,dnspy如何过滤反编译之后的乱码,dnspy如何反编译表达式目录树

    dnSpy应该是目前使用最多的.net反编译工具.很多情况下反编译C#代码非常方便,特别是查找基类,子类.搜索一些class,方法.接口,非常方便.比ILspy好很多.而且dnspy是可以配置的. 如 ...

  9. 【.Net】C# 反编译工具之dnSpy

    下载地址:https://github.com/0xd4d/dnSpy/releases无需安装,和 ILSPY同门,感觉比ILSPY还强大 直接把dll拖拽到程序集资源管理器里面就可以啦

  10. .NET dnSpy 程序集编辑器,反编译器和调试器

    https://github.com/0xd4d/dnSpy https://github.com/0xd4d/dnSpy/releases/ dnSpy是反向工程.NET程序集的工具.它包括一个反编 ...

随机推荐

  1. vue开大主要难点解决方式

    问题:在我们那vue开发项目时,多层嵌套组件最繁琐,组件传参成最难的问题,并且对兄弟组件传参也无能为力,也会导致代码很难维护. 解决:采用vuex状态管理,把所有的事件和状态都储存在store对象中, ...

  2. MySQL 下载与安装

    从MySQL官网下载安装文件,我的电脑是window10 64位的,下载社区版本,选择mysql community server,再下载64位的. 官网链接:https://www.mysql.co ...

  3. PPT中准确插入公式

    Mathtype直接输入到PPT中的公式,漂移且太小.一般的文本公式不美观. 将Mathtype的公式作为文本形式出现,既解决了漂移和大小的问题,也兼顾的美观. 具体操作如下: 1 打开Mathtyp ...

  4. linux中查看文件夹结构的小工具

    tree命令是Linux/UNIX系统中常用的命令,可以非常方便地查看文件夹的结构,并且以树形目录的形式展示 在Ubuntu中安装 sudo apt-get install tree 在CentOS中 ...

  5. shell脚本中的数组

    以下命令,都是以数组array=("20150417" "20150416" "20150415")为例. 注意bash中只支持一维数组,没 ...

  6. linux yum 安装及卸载

    在Centos中yum安装和卸载软件的使用方法安装方法安装一个软件时yum -y install httpd安装多个相类似的软件时yum -y install httpd*安装多个非类似软件时yum ...

  7. spring cloud eureka注册原理-注册失败填坑

    写在前面 我们知道Eureka分为两部分,Eureka Server和Eureka Client.Eureka Server充当注册中心的角色,Eureka Client相对于Eureka Serve ...

  8. Python time、datetime、os、random、sys、hashlib、json、shutil、logging、paramiko、subprocess、ConfigParser、xml、shelve模块的使用

    文章目录: 1. time & datetime模块 2. os模块 3. random模块 4. sys模块 5. hashlib模块 6. json模块 7. shutil模块 8. lo ...

  9. Single List Reversion

    LeetCode 1. 基于头插法的迭代: public ListNode reverseList(ListNode head) { if(head == null) return null; Lis ...

  10. mysql导入redis

    将mysql中数据库指定表导入redis 如何将mysql中某个数据库中的表数据快速导入redis? 以下将演示将本地127.0.0.1中数据库test中的表t_abc导入本地redis中.步骤如下: ...