28 July, 2024 - 06:41 AM
(14 July, 2024 - 12:27 AM)Autoclicker Wrote: Show MoreHello,
Papa Murphy's has made a degenerate login system. It consists of 3 different functions either reversing a string or changing it's order.
Theses are the functions used :
Code:
public static string Auth1(string input)
{
char[] charArray = input.ToCharArray();
for (int i = 0; i < charArray.Length; i++)
{
char c = charArray[i];
if (char.IsLetter(c))
{
char baseChar = char.IsLower(c) ? 'a' : 'A';
charArray[i] = (char)(baseChar + ((c - baseChar + 13) % 26));
}
}
return new string(charArray);
}
public static string Auth2(string input)
{
string[] chunks = new string[(input.Length + 2) / 3];
for (int i = 0; i < input.Length; i += 3)
{
int chunkLength = Math.Min(3, input.Length - i);
chunks[i / 3] = new string(input.Substring(i, chunkLength).Reverse().ToArray());
}
return string.Join("", chunks);
}
public static string Auth3(string input) => new string(input.Reverse().ToArray());
WARNING
DO NOT CHANGE THE DEFAULT THREAD COUNT
Thanks