修改分两步
打开安装路径下.\resources\app\out\WebServer\ClientApp\dist
目录。
在里面找到 main.304c864f4d0af6e9.js
用vscode或其他软件打开,搜索
updateUserLicense(Ie){
方法的开始插入
Ie.licenseInfo.currentLicense = "Pro";
Ie.licenseInfo.hasExpiredTrial = false;
Ie.licenseInfo.isTrialAvailable = false;
Ie.licenseInfo.hasValidLicense = true;
操作步骤如下:
ildasm.exe
是由微软提供的.NET程序反编译工具,位于
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools2) 用ildasm打开要修改的程序集
3) 通过ildasm保存为IL文件 选择菜单File>Dump,选择UTF-8编码
.il
文件
.il
文件中的代码并保存
.il
文件编译为.dll
文件
ilasm位于相应的.NET Framework目录中,比如:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe
安装目录.\resources\app\out\WebServer
目录下找到FiddlerBackendSDK.dll
cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools"
./ildasm.exe
把FiddlerBackendSDK.dll
拖到打开的窗口中
定位到 FiddlerBackendSDK.User.UserClient::GetBestAccount
文件=>转储 选项保持默认
我们可以在导出的il文件用文本文档打开,搜索
// end of method UserClient::GetBestAccount
向上找到方法体
删除 IL_000d 到 IL_0020 对应 if 语句 删除 IL_003f 到 IL_0040 对应
return null;
语句
如图
找到
其中源代码为
我们可以通过搜索
// end of method '<>c__DisplayClass18_0'::'<GetBestAccount>b__0'
找到后
删除 IL_0000 到 IL_0019 , 在 IL_001e 前插入
ldc.i4.1
修改后如下
重新生成DLL
cd "C:\Windows\Microsoft.NET\Framework\v4.0.30319\"
./ilasm.exe /dll /Resource=D:\temp\z.res D:\temp\z.il /output=D:\temp\FiddlerBackendSDK.dll
使用下面两个工具中任选其一查看代码
ILSpy
https://github.com/icsharpcode/ILSpy/releases
链接:https://pan.baidu.com/s/1y95AHGPhQXv9ohaCiBHKuQ 提取码:psvm
dnSpy
https://github.com/dnSpy/dnSpy/releases
链接:https://pan.baidu.com/s/1QcvgaOIiUu3vBKhcS-SwVw 提取码:psvm
其实上面改了那么多只是为了修改了个true
修改前
修改后