mirror of
https://github.com/KingKDot/PowerCrypt
synced 2026-06-06 16:04:30 +00:00
Add project files.
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
using System.Text;
|
||||
|
||||
namespace PowerCrypt.Obfuscator.Methods.StringObfuscation
|
||||
{
|
||||
public class StringOBFStringConstantExpressionAstUnderMember
|
||||
{
|
||||
private static readonly string GoodChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
public static string ObfuscateString(string str)
|
||||
{
|
||||
//TODO: FIX
|
||||
//return str;
|
||||
|
||||
var stringBuilder = new StringBuilder();
|
||||
|
||||
// for each character in the string, if the character is capital letter or number, then add a ` before it.
|
||||
foreach (var c in str)
|
||||
{
|
||||
if (GoodChars.Contains(c))
|
||||
{
|
||||
stringBuilder.Append('`');
|
||||
}
|
||||
stringBuilder.Append(c);
|
||||
}
|
||||
|
||||
var outString = '"' + stringBuilder.ToString() + '"';
|
||||
|
||||
return outString;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user