求高手帮忙看下代码
本人反编译了一段别人的代码如下:
Public Function MD5(ByVal sMessage As String, ByVal stype As Integer) As String
' This item is obfuscated and can not be translated.
Dim str As String
Dim str2 As String
Dim num As Integer
GoTo Label_001F
Label_0002:
Select Case num
Case 0
GoTo Label_0083
Case 1
Return str2
Case 2, 4
str2 = str
num = 1
GoTo Label_0002
Case 3
If (stype <> &H20) Then
str = Strings.LCase(Strings.Mid(str, 9, &H10))
num = 4
Else
num = 0
End If
GoTo Label_0002
End Select
Label_001F:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(sMessage, "MD5")
num = 3
GoTo Label_0002
If (1 <> 0) Then
End If
str = Strings.LCase(str)
num = 2
GoTo Label_0002
End Function
Public Sub domain()
HttpContext.Current.Response.Write(Me.MD5(Strings.LCase(Me.MD5((Me.MD5(("domain.com" & "domain"), &H10) & Me.MD5(Strings.StrReverse(("domain.com" & "domain")), &H20)), &H10)), &H20))
End Sub
反编译出来有很多错误,,我是做c#开发的,,vb.net不是很懂,求高人给修改下
------解决方案--------------------
vb.net 转C# 工具
http://www.carlosag.net/Tools/CodeTranslator/
http://blog.csdn.net/weizhiai12/article/details/6936198
public string MD5(string sMessage, int stype) {
// This item is obfuscated and can not be translated.
string str;
string str2;
int num;
goto Label_001F;
Label_0002:
switch (num) {
case 0:
goto Label_0083;
break;
case 1:
return str2;
break;
case 2:
case 4:
str2 = str;
num = 1;
goto Label_0002;
break;
case 3:
if ((stype != 32)) {
str = str.Substring(8, 16).ToLower();
num = 4;
}
else {
num = 0;
}
goto Label_0002;
break;
}
Label_001F:
str = FormsAuthentication.HashPasswordForStoringInConfigFile(sMessage, "MD5");
num = 3;
goto Label_0002;
if ((1 != 0)) {
}
str = str.ToLower();
num = 2;
goto Label_0002;
}
public void domain() {
HttpContext.Current.Response.Write(this.MD5(this.MD5((this.MD5(("domain.com" + "domain"), 16) + this.MD5(Strings.StrReverse(("domain.com" + "domain")), 32)), 16).ToLower(), 32));
}