initial commit

This commit is contained in:
i2p
2026-08-27 11:21:58 -06:00
commit c21fb61050
336 changed files with 74161 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
using System;
using System.Linq;
namespace Obfuscator.Helper;
internal class Methods
{
private const string Ascii = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
private const string number = "1234567890";
public static readonly Random Random = new Random();
public static string GenerateString()
{
return GenerateString((byte)Random.Next(10, 26));
}
public static string GenerateString(byte length)
{
char c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"[Random.Next("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".Length)];
char[] value = (from s in Enumerable.Repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", length - 1)
select s[Random.Next(s.Length)]).ToArray();
return c + new string(value);
}
public static bool GenerateBool()
{
return GenerateBool(2);
}
public static bool GenerateBool(byte probability)
{
return Random.Next(probability) == 1;
}
}