先貼一段程式碼,是一個簡單的運算.然後用混淆器進行業務邏輯的混淆...
基本上沒有起到作用,程式碼如下.
Dim a, b, c, d As String
d = 50
c = d
b = c
a = b
b = 20
d = 30
Dim s As Decimal
s = a + b + c * d
MsgBox(s)
--------------------------------
對比混淆後
--------------------------------
private void a(object A_0, EventArgs A_1)
{ string text1;
string text2;
string text3;
string text4;
decimal num1;
text4 = StringType.FromInteger(50);
text3 = text4;
text2 = text3;
text1 = text2;
text2 = StringType.FromInteger(20);
text4 = StringType.FromInteger(30);
num1 = new decimal((DoubleType.FromString(string.Concat(text1, text2)) + (DoubleType.FromString(text3) * DoubleType.FromString(text4))));
Interaction.MsgBox(num1, 0, null);
}
--------------------------
下面開始慢慢混淆了,看看...
原始碼為:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim a, b, c, d As Integer
d = 50
c = d
b = c
a = b
b = 20
d = 30
Dim s As Decimal
Swap(d, c)
s = add(a, add(b, c)) * c
MsgBox(s)
End Sub
Function add(ByVal a As Integer, ByVal b As Integer) As Integer
Return a + b
End Function
Function Swap(ByRef a As Integer, ByRef b As Integer)
Dim aa As Integer
aa = a
a = b
b = aa
End Function
--------------------------------------------
之後為
--------------------------------------------
private void a(object A_0, EventArgs A_1)
{ int num1;
int num2;
int num3;
int num4;
decimal num5;
num4 = 50;
num3 = num4;
num2 = num3;
num1 = num2;
num2 = 20;
num4 = 30;
this.a(&(num4), &(num3));
num5 = new decimal((this.a(num1, this.a(num2, num3)) * num3));
Interaction.MsgBox(num5, 0, null);
}
public object a(ref int A_0, ref int A_1)
{ int num1;
object obj1;
num1 = A_0;
A_0 = A_1;
A_1 = num1;
return obj1;
}
public int a(int A_0, int A_1)
{ int num1;
return (A_0 + A_1);
}
-----------------------------
讀一讀?是不是有些困難了些,當然,我是把程式碼都直接粘出來了,你讀起來還方便點,但是...如果從幾十個或是上面個....
比方說,有意的製作一個大的Class,再把Class中混淆...哇.頭痛的事來了.
算了,不繼續了,沒時間去寫很複雜的...反正大家興一反三吧.
決竅就是呼叫...功能寫在函式,寫成類,使用物件.類與類之間可能有關係...當然,還是結構邏輯第一...不要為了故意混淆搞到自己都看不懂...或看起來麻煩.
有些事情可以在專案完成的那段時間再做
有不正確之處,請指出...我對這個研究也很膚淺,如果有什麼想法也可以提出...說不定我們們自己還可以搞個什麼比這個更好的東東...