Obfuscation 反射器:这段代码中的注释是否意味着整个事情都被弄糊涂了?
因此,在下面的代码中,您会注意到注释“/”此项已模糊,无法翻译。” 我想知道的是,这是否意味着注释代替了一些模糊的代码,而后面的代码实际上并没有模糊化,还是意味着“下面的代码模糊化了” 从我在网上看到的情况来看,这听起来像是前者,但我不确定。代码看起来很模糊,但它不是不可翻译的,只是很搞笑Obfuscation 反射器:这段代码中的注释是否意味着整个事情都被弄糊涂了?,obfuscation,reflector,Obfuscation,Reflector,因此,在下面的代码中,您会注意到注释“/”此项已模糊,无法翻译。” 我想知道的是,这是否意味着注释代替了一些模糊的代码,而后面的代码实际上并没有模糊化,还是意味着“下面的代码模糊化了” 从我在网上看到的情况来看,这听起来像是前者,但我不确定。代码看起来很模糊,但它不是不可翻译的,只是很搞笑 public static NameValueCollection ParseStringIntoNameValueCollection(string responseString, bool undoCal
public static NameValueCollection ParseStringIntoNameValueCollection(string responseString, bool undoCallbackEscapes)
{
// This item is obfuscated and can not be translated.
NameValueCollection values;
string[] strArray;
int num;
string str2;
string str3;
int num3;
goto Label_0027;
Label_0002:
switch (num3)
{
case 0:
if (!undoCallbackEscapes)
{
goto Label_0057;
}
num3 = 4;
goto Label_0002;
case 1:
goto Label_00E5;
case 2:
if (num < strArray.Length)
{
string str = strArray[num];
int index = str.IndexOf('=');
str2 = str.Substring(0, index);
str3 = str.Substring(index + 1);
num3 = 0;
}
else
{
num3 = 6;
}
goto Label_0002;
case 3:
if (7 < (7 - 5))
{
goto Label_0071;
}
goto Label_00E5;
case 4:
str2 = unEscapeCallbacks(str2);
str3 = unEscapeCallbacks(str3);
num3 = 5;
goto Label_0002;
case 5:
goto Label_0057;
case 6:
return values;
}
Label_0027:
values = new NameValueCollection();
strArray = responseString.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries);
num = 0;
num3 = 1;
goto Label_0002;
Label_0057:
values.Add(str2, str3);
num++;
num3 = 3;
goto Label_0002;
Label_00E5:
num3 = 2;
goto Label_0002;
}
公共静态NameValueCollection ParseStringInNameValueCollection(字符串响应字符串,bool undoCallbackEscapes)
{
//此项目已模糊,无法翻译。
NameValueCollection值;
字符串[]strArray;
int-num;
字符串str2;
字符串str3;
int num3;
转到标签_0027;
标签_0002:
开关(num3)
{
案例0:
如果(!undoCallbackEscapes)
{
goto标签_0057;
}
num3=4;
转到标签_0002;
案例1:
转到标签_00E5;
案例2:
如果(数量<长度)
{
字符串str=strArray[num];
int index=str.IndexOf('=');
str2=str.Substring(0,索引);
str3=str.Substring(索引+1);
num3=0;
}
其他的
{
num3=6;
}
转到标签_0002;
案例3:
如果(7<(7-5))
{
转到标签_0071;
}
转到标签_00E5;
案例4:
str2=无替罪羊回调(str2);
str3=无替罪羊回调(str3);
num3=5;
转到标签_0002;
案例5:
goto标签_0057;
案例6:
返回值;
}
标签_0027:
values=新名称valuecollection();
strArray=responseString.Split(新字符[]{'&},StringSplitOptions.RemoveEmptyEntries);
num=0;
num3=1;
转到标签_0002;
标签_0057:
添加(str2、str3);
num++;
num3=3;
转到标签_0002;
标签_00E5:
num3=2;
转到标签_0002;
}
更新:我确实发现了这个。。。有时,不是经常,当Reflector为您反汇编源代码时,它会显示“此项已模糊且无法翻译”,而不是代码
对我来说,这意味着它用注释来掩盖混乱的代码。有人能证实这一点吗?我确实看了IL,它似乎显示了一切,所以这句话可能不准确
对我来说,这段代码看起来像是一个5岁的孩子用BASIC知识对它进行了模糊处理,而不是一些模糊处理软件。无论它多么模糊,你都应该能够反编译成IL,所以你可以看看它,看看reflector是否真的向你展示了一切。从某种意义上看,它似乎是模糊的,这是一个字符串函数,它根据符号和拆分字符串,并通过
开关
/大小写
确定如何处理它。goto
的用法(从外观上看)纯粹是为了让代码读者感到困惑,但方式有点糟糕
当然,您可以使用Redgate的reflector(以前是Rutz Loeder的reflector)加载任何.NET EXE/DLL来分析和转储代码,因此,无论代码如何“模糊化”,模糊化都不会真正起作用,因为代码可以很容易地反编译
除非对.NET EXE/DLL进行加密,并使用非托管C/C++代码加载.NET运行时、解密.NET EXE并将其加载到新托管的appdomain中,否则没有真正的方法保护.NET EXE/DLL
希望这有帮助,
顺致敬意,
Tom。应该注意的是,案例3也是随机数发生器的工作原理。因此,我确实研究了IL,我的意思是,似乎所有的事情都是可能的,但这有点难说。反射器怎么会知道这是模糊代码呢?那我们怎么能做到呢?你能举一个hello world的例子吗?