Skip to content

Instantly share code, notes, and snippets.

@vakata
Created September 17, 2013 12:02
Show Gist options
  • Save vakata/6593424 to your computer and use it in GitHub Desktop.
Save vakata/6593424 to your computer and use it in GitHub Desktop.
import Filezilla to KeePass
$xml = simplexml_load_file('FileZilla.xml');
$csv = fopen('FileZilla.csv','w');
fputcsv($csv, ["Account","Login Name","Password","Web Site","Comments"]);
foreach($xml->xpath('//Server') as $server) {
fputcsv($csv, [(string)$server->Name, (string)$server->User, (string)$server->Pass, ((int)$server->Protocol ? 'sftp://' : 'ftp://' ) . (string)$server->Host.':'.(string)$server->Port, (string)$server->Comments]);
}
fclose($csv);
@bauinformatiker
Copy link

Very usefull peace of work - thank you!

@orion3dgames
Copy link

Thanks :)

@edilecachan
Copy link

That's what I like, Simple, direct and efficient :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment