Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Commit 518f052

Browse files
authored
String update
1 parent cd05253 commit 518f052

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Protections/ProxyAdder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static void Execute()
8383
}
8484
}
8585

86-
Console.WriteLine($"Added {Amount} proxy calls.");
86+
Console.WriteLine($" Added {Amount} proxy calls.");
8787
}
8888
}
8989
}

Protections/StringEncryption.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ public static void Execute()
2828
if (method.Body.Instructions[i].OpCode == OpCodes.Ldstr)
2929
{
3030
string operand = method.Body.Instructions[i].Operand.ToString();
31-
method.Body.Instructions[i].Operand = Convert.ToBase64String(Encoding.UTF8.GetBytes(operand));
31+
method.Body.Instructions[i].Operand = Convert.ToBase64String(Encoding.UTF32.GetBytes(operand));
3232
method.Body.Instructions.Insert(i + 1, OpCodes.Call.ToInstruction(strings));
3333
++Amount;
3434
}
3535
}
3636
}
3737

38-
Console.WriteLine($"Encrypted {Amount} strings.");
38+
Console.WriteLine($" Encrypted {Amount} strings.");
3939
}
4040

4141
private static MethodDef CreateReturnMethodDef()
@@ -49,7 +49,7 @@ private static MethodDef CreateReturnMethodDef()
4949

5050
newMethod.Body.Instructions.Add(OpCodes.Nop.ToInstruction());
5151
newMethod.Body.Instructions.Add(
52-
OpCodes.Call.ToInstruction(Program.Module.Import(typeof(Encoding).GetMethod("get_UTF8"))));
52+
OpCodes.Call.ToInstruction(Program.Module.Import(typeof(Encoding).GetMethod("get_UTF32"))));
5353
newMethod.Body.Instructions.Add(OpCodes.Ldarg_0.ToInstruction());
5454
newMethod.Body.Instructions.Add(
5555
OpCodes.Call.ToInstruction(Program.Module.Import(typeof(Convert).GetMethod("FromBase64String",

0 commit comments

Comments
 (0)