Jump to content
Tuts 4 You

How to automate patching file with DnSpy


Handunken22

Recommended Posts

Handunken22
Posted

Hello everyone! I am patching a file by DnSPY, so here is what I did:

1. Open file with DnSpy

2. Search for the function I want to patch

3. Patch the function by changing the first IL opcode to "ret"

4. Enable the "Keep old maxstack" checkbox

5. Save the new file

But the problem is that, this software usually has a new update, and everytime it updates, I have to re-patch again which is time-consuming. So do you guys know any library/method that can help me automate this process? Any help will be appreciated.

  • Like 1
jackyjask
Posted

You could give it a try to some .net patching library, eg Harmony (there are more)

  • Like 1
Handunken22
Posted
1 hour ago, jackyjask said:

You could give it a try to some .net patching library, eg Harmony (there are more)

Thanks for the suggestion. If you know anymore please tell me, I will try them all

  • Like 1
whoknows
Posted

1)

download from releases the application by @Mobile46

github.com/mobile46/DotNetUniversalPatcher

2)

you can develop a .net application with dnlib

github.com/Mrakovic-ORG/NetLimiter_Patcher
github.com/Mrakovic-ORG/TablePlus_Patcher

  • Like 1
  • Thanks 2
Handunken22
Posted
7 hours ago, whoknows said:

1)

download from releases the application by @Mobile46

github.com/mobile46/DotNetUniversalPatcher

2)

you can develop a .net application with dnlib

github.com/Mrakovic-ORG/NetLimiter_Patcher
github.com/Mrakovic-ORG/TablePlus_Patcher

Thank you! The first one is what I need. Also I think dnlib is great, I will try it in the future

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...