How to import passwords from Opera to PM? Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
JustOff

Import passwords from FF58+

Unread post by JustOff » 2018-12-17, 17:59

Due to repeated requests, I finally implemented the basic support for importing passwords from Firefox 58+ (key4.db). To do this, you need to navigate to the desired profile and select the logins.json file in the import dialog. Master password protected data is not supported yet, you must first disable it in the source browser.

At the moment, this feature should be considered as experimental, so do not forget to backup your workplace.

JustOff

Password Backup Tool

Unread post by JustOff » 2018-12-27, 13:16

Password Backup Tool has been updated to 1.2.1:
  • Add support for importing passwords from Firefox 58+ profiles (raw and password protected)

User avatar
bawldiggle
Lunatic
Lunatic
Posts: 446
Joined: 2013-02-22, 21:16
Location: East Coast Australia

Re: Import PM passwords into a clean PM install ?

Unread post by bawldiggle » 2019-01-05, 00:06

PM has been very unstable over several months, with a new profile there has been a marginal improvement but not brilliant.
A clean install is my next step.

:?: If I copy the old profile to a safe folder (with PM closed of course !) ... can I direct Password Backup Tool to the "safe" folder ?
- I have about 4 or more years of passwords and the thought of losing them is too much to "bear"

Thank you :)

Palemoon : v28.2.2 (32-bit)
Win-7 PRO x64
Win-7 PRO 64-bit
Palemoon; auto updates current version (32-bit)

doofy
Astronaut
Astronaut
Posts: 650
Joined: 2017-08-14, 23:43

Re: Import PM passwords into a clean PM install ?

Unread post by doofy » 2019-01-05, 00:16

bawldiggle wrote:If I copy the old profile to a safe folder (with PM closed of course !) ... can I direct Password Backup Tool to the "safe" folder ?
- I have about 4 or more years of passwords and the thought of losing them is too much to "bear"
I use Password Exporter 1.3.4, and what I would do is export passwords before backing up my profile.

Can you not do that with PBT?

User avatar
bawldiggle
Lunatic
Lunatic
Posts: 446
Joined: 2013-02-22, 21:16
Location: East Coast Australia

Re: How to import passwords from Opera to PM?

Unread post by bawldiggle » 2019-01-05, 01:39

@doofy :)

I have not got that far yet. Still planning how to save (recycle) Passwords Metadata, Cookies and cookie-Exclusions.
Thanks for the tip to Password Exporter 1.3.4 ... I will have a look at it.
Win-7 PRO 64-bit
Palemoon; auto updates current version (32-bit)

JustOff

Re: How to import passwords from Opera to PM?

Unread post by JustOff » 2019-01-05, 12:32

bawldiggle wrote:Thanks for the tip to Password Exporter 1.3.4 ... I will have a look at it.
I do not recommend you to use Password Exporter, as it contains bugs that are fixed in Password Backup Tool. You can export your passwords from the old profile using PBT and then import them into a new one, or simply exit the browser and copy logins.json and key3.db from the old to the new profile.

mekineer

Re: How to import passwords from Opera to PM?

Unread post by mekineer » 2019-04-13, 22:44

What is the Chrome json formatting that is expected by the Password Backup Tool? I am trying to imitate it, but I don't have an example to follow. I get: "Error: Couldn't get data from the Chrome password database"

mekineer

Re: How to import passwords from Opera to PM?

Unread post by mekineer » 2019-04-13, 23:20

Also, I want to add, that I have a script to scrape the passwords from Google Chrome, and instructions on how to use it. The script was made by Saro Saribekyan.

1) Have Chrome installed, and you need to log into chrome with your google account, if you haven't already done so.
2) Set up Chrome sync, if you haven't already done so.
3) Pull up Chrome settings, and view your passwords.
4) Zoom out of the page as far as it will go.
4) Ctrl-Shift-J to open the console.
5) Copy the script below, and paste it into the console. Press enter.
6) Call the function collect(). Do this by typiing "collect()" without quotes, and press enter. The purpose is to get all your passwords to show on the page. Scroll down to the bottom of the page, and call the collect() function again. Do this ad nauseam, until no new passwords are appearing.
7) Call the function download(), which will bring up a save dialog, where you can save your passwords in json format.

Code: Select all

valuesArray = [];

function download(fileName) {

    if (isEmptyOrSpaces(fileName)) {
        fileName = "Google-Passwords";
    }

    fileName += ".json";

    var file = JSON.stringify(valuesArray);

    return downloadFile(file, fileName, "application/json");
}
function downloadFile(strData, strFileName, strMimeType) {
    var D = document,
        A = arguments,
        a = D.createElement("a"),
        d = A[0],
        n = A[1],
        t = A[2] || "text/plain";

    //build download link:
    a.href = "data:" + strMimeType + "charset=utf-8," + escape(strData);


    if (window.MSBlobBuilder) { // IE10
        var bb = new MSBlobBuilder();
        bb.append(strData);
        return navigator.msSaveBlob(bb, strFileName);
    } /* end if(window.MSBlobBuilder) */



    if ('download' in a) { //FF20, CH19
        a.setAttribute("download", n);
        a.innerHTML = "downloading...";
        D.body.appendChild(a);
        setTimeout(function () {
            var e = D.createEvent("MouseEvents");
            e.initMouseEvent("click", true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
            a.dispatchEvent(e);
            D.body.removeChild(a);
        }, 66);
        return true;
    }; /* end if('download' in a) */



    //do iframe dataURL download: (older W3)
    var f = D.createElement("iframe");
    D.body.appendChild(f);
    f.src = "data:" + (A[2] ? A[2] : "application/octet-stream") + (window.btoa ? ";base64" : "") + "," + (window.btoa ? window.btoa : escape)(strData);
    setTimeout(function () {
        D.body.removeChild(f);
    }, 333);
    return true;
}
function isEmptyOrSpaces(str) {
    return str == null || str == undefined || str.match(/^ *$/) !== null;
}
function getListItem() {
    var list = getLastShadow().querySelector('div.list-frame iron-list#passwordList');
    return list;
}

function getList() {
    var list = getListItem().getElementsByTagName('password-list-item');
    return list;
}

function getLastShadow() {
    var shadow = document.querySelector('settings-ui').shadowRoot.querySelector('div#container').querySelector('settings-main').shadowRoot.querySelector('settings-basic-page.showing-subpage').shadowRoot.querySelector('div#basicPage settings-section settings-autofill-page').shadowRoot.querySelector('settings-animated-pages#pages settings-subpage passwords-section').shadowRoot;
    return shadow;
}

function getItemValues(item) {
    var innerItem = item.shadowRoot.querySelector('div.list-item');

    var domain = innerItem.querySelector('div.website-column a#originUrl span.text-elide bdo').innerText;
    var username = innerItem.querySelector('input#username').value;

    var passwordColumn = innerItem.querySelector('div.password-column');

    var pass = passwordColumn.querySelector('input#password').value;

    var itemValues = { domain: domain, username: username, password: pass };

    return itemValues;
}

function uncoverPasswords(list) {
    for (i = 0; i < list.length;i++) {
        var innerItem = list[i].shadowRoot.querySelector('div.list-item');

        var passwordColumn = innerItem.querySelector('div.password-column');
        var pass = passwordColumn.querySelector('input#password').value;

        if (isEmptyOrSpaces(pass)) {
            passwordColumn.querySelector('paper-icon-button-light button').click();
        }
    }
}

function addItem(item) {
    var exist = false;

    for (i = 0; i < valuesArray.length; i++) {
        if (valuesArray[i].domain == item.domain && valuesArray[i].username == item.username && valuesArray[i].password == item.password) {
            exist = true;
            break;
        }
    }
    
    if (!exist) {
        valuesArray.push(item);
    }
}

function collect() {
    var list = getList();

    uncoverPasswords(list);

    setTimeout(function () {

        for (var i = 0; i < list.length; i++) {
            var item = getItemValues(list[i]);
            addItem(item);
        }

        console.log("Collected: " + valuesArray.length);
    }, 200);

}

mekineer

Re: How to import passwords from Opera to PM?

Unread post by mekineer » 2019-04-14, 01:12

Ok, this was unnecessary. I didn't see that the Backup Tool could already do this.
https://addons.palemoon.org/addon/password-backup-tool/

dapgo
Fanatic
Fanatic
Posts: 208
Joined: 2016-10-11, 11:36

Re: How to import passwords from Opera to PM?

Unread post by dapgo » 2019-06-26, 13:33

Is compatible with FF56/basilisk/Waterfox?

dapgo
Fanatic
Fanatic
Posts: 208
Joined: 2016-10-11, 11:36

Re: How to import passwords from Opera to PM?

Unread post by dapgo » 2019-06-27, 06:53

I reply myself, seems to work fin withy Basilisk :)
dapgo wrote:
2019-06-26, 13:33
Is compatible with FF56/basilisk/Waterfox?

pluto459

Re: How to import passwords from Opera to PM?

Unread post by pluto459 » 2019-09-16, 01:44

JustOff wrote:
2019-01-05, 12:32
Using 28.6.1 and I cant find anywhere the tab or button to export my pw. Please advise location, nothing under tools.

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: How to import passwords from Opera to PM?

Unread post by coffeebreak » 2019-09-16, 06:33

pluto459 wrote:
2019-09-16, 01:44
I cant find anywhere the tab or button to export my pw. Please advise location, nothing under tools.
Is Password Backup Tool installed ? That is what provides the ability to import/export passwords.

Once it's installed, open the Add-ons Manager (about:addons, or Ctrl+Shift+A) and click the extension's Options button.

Locked