0

Im working on old software written in C# .NET for increase skills in dnSpy. im new in dnSpy.

When I step-in dnSpy, the program get license information from another dll file. and the dll class are only have get; methods, when I want to set the value (write code in dnSpy) the main program give me an error.

Also when I step-in and the dnSpy get license information from dll file, I can see and change the value of license in Locals section, I can set activated flag value to true and run the program as activated. is there any way to save the changes during run? because as I said, I can't write code in dnSpy, I just want patch the exe file, not DLL. (as I found the activated program on internet, they only changes the .exe file, not dll's)

Note: The activated version of the software available on internet for free. The question is only for further study and research.

6
  • "because as I said, I can't write code in dnSpy, I just want patch the exe file" why you can't write code in dnSpy? This is not clear to me. You can edit the exe in dnSpy and save the changed one. Aug 28, 2021 at 7:36
  • @PawełŁukasik because the dll is not import. i mean i can't saved using xxx.xxx.xxx; dll files. I changed the value of IsActivate to true and run the program, but i can't save the exe during run-time.
    – Jason
    Aug 28, 2021 at 9:51
  • You just need to add extra code in dnSpy that sets IsActivate to true and save the exe and that's doable. Aug 28, 2021 at 12:19
  • @PawełŁukasik Yes, but when I try to edit method and add reference DLL's, After clicking compile, the using xxx.xxx.xxx ; not saved in main program and returns to the original codes.
    – Jason
    Aug 28, 2021 at 12:49
  • I still don't get it why you would need to add any reference. I would assume the exe already has it. Maybe edit your question and include the relevant parts of code? Aug 28, 2021 at 15:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.