So I've been messing around with a script to read the FileZilla.xml settings file and automatically parse the file for passwords.
Then decode those passwords and output them, labelled, on a newline...
This is what I've gotten so far..
Code:
# Parse Filezilla passwords and decode from base64
ftp_decode() {
sed -n 's/^.*base64">\(.*\)<\/Pass>$/\1/mp' /home/dara/.config/filezilla/sitemanager.xml | base64 --decode
}
Now what i want to do is to output them all on a newline and label them ie.
Code:
MySite1: mypass
MySite2: mypass1
MySIte3: mypass2
This is an example of a FileZilla.xml file...
Code:
<FileZilla3 version="3.46.3" platform="*nix">
<Servers>
<Server>
<Host>*******</Host>
<Port>21</Port>
<Protocol>0</Protocol>
<Type>0</Type>
<User>******</User>
<Pass encoding="base64">Mypass</Pass>
<Logontype>1</Logontype>
<TimezoneOffset>0</TimezoneOffset>
<PasvMode>MODE_DEFAULT</PasvMode>
<MaximumMultipleConnections>0</MaximumMultipleConnections>
<EncodingType>Auto</EncodingType>
<BypassProxy>0</BypassProxy>
<Name>MySite</Name>
<Comments></Comments>
<Colour>0</Colour>
<LocalDir/>
<RemoteDir/>
<SyncBrowsing>0</SyncBrowsing>
<DirectoryComparison>0</DirectoryComparison>
</Server>
Can anyone help? I'd prefer to use native bash rather than perl.