bw-export — Export Avendesora Accounts to BitWarden

https://pepy.tech/badge/bw-export/month https://img.shields.io/pypi/v/bw-export.svg https://img.shields.io/pypi/pyversions/bw-export.svg
Authors: Ken Kundert
Version: 0.0.0
Released: 2022-06-19
Documentation: NurdleTech.
Please post all questions, suggestions, and bug reports to: Github issues.

This utility allows you to export select accounts from Avendesora in a form that can easily be imported into BitWarden. Avendesora is a very flexible and secure password manager for the Linux command line and BitWarden in an open source commercial password manager supported on a wide variety of platforms, such as Windows, Mac, IOS, and Android.

This package provides two programs. bw-csv-export is the simpler of the two, it is less capable. bw-json-export supports more BitWarden’s features and generally preferred. Both allow you to export select accounts from Avendesora into an interchange file that can be uploaded to the BitWarden Web Portal, and from there the information syncs with all of your BitWarden-linked devices. If you are not comfortable sharing your account information with BitWarden, you can install and run your own BitWarden server.

Installation

Install with:

pip install bw-export

It will install both bw-csv-export and bw-json-export to ~/.local/bin.

You can find the latest version of the source code on Github.

bw-json-export

Generates a JSON file (bw.json) suitable for uploading to a BitWarden Vault.

Usage:

bw-json-export

Only those accounts with “bitwarden” field are exported. The “bitwarden” field is expected to be a dictionary that contain the fields to be exported. The value may be a simple string or it may be a script, and in some cases it may be a dictionary.

A typical example is:

bitwarden = dict(
    type = "login",
    name = "The Economist",
    urls = urls,
    username = email,
    password = "{passcode}",
)

You can add arbitrary fields using fields as represented by a NestedText dictionary:

bitwarden = dict(
    type = "login",
    name = "Visa",
    fields = """
        holder: {name}
        ccn: {ccn}
        exp: {exp}
        cvv: {cvv}
        report: {support}
    """,
)

You can also use a Python dictionary:

bitwarden = dict(
    type = "login",
    name = "Visa",
    fields = dict(
        holder = name,
        ccn = ccn,
        exp = exp,
        cvv = cvv,
        report = support,
    ),
)

Documentation on the fields can be found in the BitWarden API Documentation. There are four types of entries supported, and they accept the following fields:

1: login
    name
    username
    password
    totp
    urls
    fields
    notes

2: secureNote
    name
    notes
    fields

3: card
    name
    brand
    holder
    ccn
    exp
    cvv
    fields
    notes

4: identity
    name
    title
    names
    street
    city
    state
    zip
    country
    email
    phone
    company
    ssn
    username
    passport
    license
    fields
    notes

Running bw-json-export creates the file: bw.json.

Once created, it can be imported from the BitWarden website (vault.bitwarden.com). When importing, use “Bitwarden (json)” as the file format.

By policy, BitWarden create duplicates of any imported accounts if they were previously imported. As such, you should will need to delete the existing accounts. A convenient way of doing so would be to partition your BitWarden cards into two folders, one dedicated to accounts imported from Avendesora and one dedicated you your BitWarden native cards. Before importing, first delete all the entries in the “Avendesora” folder, and then delete the folder itself by clicking on it, a pencil icon will appear, click on that, and then click on the trash can icon. Importing will then create a new “Avendesora” folder.

After first run, a settings file is created in ~/.config/bw-json-export/settings.nt. You can use it to control the name of the “Avendesora” folder. The default value is “[Avendesora-]YYMMDD”. You can eliminate the date using “[Avendesora]” or you can delete the folder completely. The characters within the brackets is output verbatim and the remaining characters are interpreted as an Arrow format.

After importing your bw.json file you must delete it as it contains your secrets in plain text.

You can use Bitwarden to autofill fields on Android. To do so you must first enable configure Android to use Bitwarden for AutoFill (Settings→Passwords→Autofill). Then when you select a field that matches an account you have configured in Bitwarden, you will see button that allows you to autofill the value. The first time you push it you will likely get an error message saying the entry cannot be found. It will give you the name it is expecting. For example, for the NordVPN app it needs ‘com.nordvpn.android’. You need to add this to your list of urls. For example:

bitwarden = dict(
    type = 'login',
    name = 'NordVPN',
    login_uri = [urls, 'androidapp://com.nordvpn.android'],
    login_username = email,
    login_password = "{passcode}",
)

bw-csv-export

Generates a CSV file (bw.csv) suitable for uploading to a BitWarden Vault.

Usage:

bw-csv-export

Only those accounts with “bitwarden” field are exported. The “bitwarden” field is expected to be a dictionary that may contain the following fields: folder, type, name, notes, fields, url, username, password, and totp. If not given, they are left blank. Each value may be a simple string or a script.

A typical example is:

bitwarden = dict(
    type = "login",
    name = "The Economist",
    login_uri = urls,
    login_username = email,
    login_password = "{passcode}",
)

You can add arbitrary name-value pairs using fields:

bitwarden = dict(
    type = "login",
    name = "Visa",
    fields = """
        holder: {name}
        number: {ccn}
        exp: {exp}
        cvv: {cvv}
        report: {support}
    """,
)

Running bw-csv-export creates the file: bw.csv.

Once created, it can be imported from the BitWarden Vault website (vault.bitwarden.com). When importing, use “Bitwarden (csv)” as the file format.

By policy, BitWarden create duplicates of any imported accounts if they were previously imported. As such, you should delete existing accounts before re-importing to avoid duplicate accounts. A convenient way of doing so would be to partition your BitWarden entries into two folders, one dedicated to accounts imported from Avendesora and one dedicated you your BitWarden native entries. Normally you would keep the “No Folder” folder empty. BitWarden places freshly imported accounts into “No Folder”. You should then delete any existing accounts in the “Avendesora” folder and move all the new accounts in “No Folder” to the “Avendesora” folder.

You must then delete the bw.csv file as it can include your secrets in plain text.

Releases

Latest Development Version:
Version: 0.0.0
Released: 2022-06-19
0.0 (2022-05-19)
  • initial release