Results 1 to 3 of 3

Thread: Script to decode FileZilla Base 64 passwords on ubuntu?

  1. #1
    Join Date
    Aug 2005
    Beans
    465

    Script to decode FileZilla Base 64 passwords on ubuntu?

    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.
    I wish my computer would do what I want it to do - not what I tell it to do.

  2. #2
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Script to decode FileZilla Base 64 passwords on ubuntu?

    I find ripgrep to be useful ..

    for your scenario ...

    ~/.config/filezilla$ rg -i encoding="base64"

    might be one search pattern to start with.
    But you will need to format your output.


  3. #3
    Join Date
    Aug 2005
    Beans
    465

    Re: Script to decode FileZilla Base 64 passwords on ubuntu?

    Quote Originally Posted by dragonfly41 View Post
    I find ripgrep to be useful ..

    for your scenario ...

    ~/.config/filezilla$ rg -i encoding="base64"

    might be one search pattern to start with.
    But you will need to format your output.

    Thanks dragonfly,

    Not sure that ripgrep is what I'm looking for to be honest.

    At the moment, I'm getting the decoded passwords for all my sites...

    mypass1mypass2mypass3mypass4
    what I want is something like this...

    MYSITE1: mypass1
    MYSITE2: mypass2
    MYSITE3: mypass3
    MYSITE4: mypass4
    Any bash/sed experts out there that can help?
    Last edited by dbee; May 31st, 2021 at 05:07 AM.
    I wish my computer would do what I want it to do - not what I tell it to do.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •