Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
look on this class
i want to edit this line
public static string No = "";
to this line
public static string No = "1";

C#
namespace Start
{
	[StandardModule]
	internal sealed class Digital
	{
		public static int Mode()
		{
			return 0;
		}
		public static string No = "";
	}
}


What I have tried:

C#
using System.Reflection;
using HarmonyLib;

namespace Loader
{
    public class Patcher
	{
        
        public static void Patch()
        {
            harmony = new Harmony("upx");
            harmony.PatchAll(Assembly.GetExecutingAssembly());
            
        }

        public static void UnPatch()
        {
            harmony.UnpatchAll("upx");
        }

        private static Harmony harmony;

        [HarmonyPatch("Digital", "Mode")]
        public class LicensePatcher
        {
           
            public static void Postfix(ref int __result)
            {
                __result = 1;
            }
        }
    }
}
Posted
Updated 31-Jan-23 22:16pm
v4

You're going to have to contact the authors of Harmony for that, either from the link on their site or their Discord server[^].
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900