NetProtect.CodeConfuser/Form1.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using NetProtect.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;
namespace DotNet.CodeConfuser
{
public partial class Form1 : Form
{
/// <summary>
/// 源代码的字符索引集
/// </summary>
List<int> TIndexOfChar = null;
/// <summary>
/// 源代码的字符集
/// </summary>
List<string> TSourceCodeChar = null;
public Form1()
{
InitializeComponent();
}
/// <summary>
/// 点击“转换”
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void buttonConfuse_Click(object sender, EventArgs e)
{
List<string> list = new List<string>();
//源代码
string sourceCode = CodeString.RemoveComment(this.richTextBoxSourceCode.Text);
//sourceCode = CodeString.RemoveComment(sourceCode);
//源代码字符数组
char[] sourceCodeArray = sourceCode.ToCharArray();
//源代码字符数组集(只提取不重复的字符)
List<char> codeCharList = sourceCodeArray.Distinct().Select(m => m).ToList();
if (codeCharList != null && codeCharList.Count > 0)
{
TSourceCodeChar = new List<string>();
foreach (char code in codeCharList)
{
TSourceCodeChar.Add(CodeString.ByteToHex(Encoding.UTF8.GetBytes(code.ToString())));
}
//打乱字符顺序
TSourceCodeChar = TSourceCodeChar.Select(a => new { a, newID = Guid.NewGuid() }).OrderBy(b => b.newID).Select(c => c.a).ToList();
string stringArray = "char c[] = { " + string.Join(",", TSourceCodeChar.ToArray()) + " };\r\n";
后面还有 82 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。