saving login names/passw into simple text file

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!
heinz57g

saving login names/passw into simple text file

Unread post by heinz57g » 2021-04-03, 11:21

hello, when going PREFERENCES and SAVED PASSWORDS and before filtering out a specific one,
i used to see a list of login names and passwords, with a click one could save both, one at a time.

that was easy at a time when there were three or four there - long long since gone.

now there are well over 100 by now - how can i save them all into a simple text file, then being
printed out and well kept at a secret place? anything that could be done from within PM, or with
any addon or even external program?

would appreciate any suggestions - many greetings - heinz -

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

Re: saving login names/passw into simple text file

Unread post by coffeebreak » 2021-04-03, 15:40

heinz57g wrote:
2021-04-03, 11:21
PREFERENCES and SAVED PASSWORDS ...
i used to see a list of login names and passwords, with a click one could save both, one at a time.
Preferences -> Security -> "Saved Passwords"..?
That's not a native browser function, it sounds like it came from an extension.

Personally I use the extension Password Backup Tool, installable from here.
It does something close to what you want.
It allows to save passwords + login names as either .xml or .csv files which can be opened with a text editor (for convenience, also change the file extension to .txt). So long as you don't choose the option to obfuscate the contents, the file will be human-readable.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: saving login names/passw into simple text file

Unread post by Kris_88 » 2021-04-03, 16:52

1) Open about:config page, set "devtools.chrome.enabled" preference to true.
2) Open menu tools > web developer > scratchpad
3) Set "Environment" to "Browser"
4) Paste the script:

Code: Select all

let sm = Components.classes["@mozilla.org/login-manager/storage/json;1"].
                   createInstance(Components.interfaces.nsILoginManagerStorage);
sm.initialize();
let data = sm.getAllLogins({});
let str = '';
for(let i=0; i<data.length; i++)
  str = str + '"'+data[i].hostname+'", "' + data[i].username + '", "' + data[i].password + '"\n';
sm = null;
alert(str);
5) Press "Run"
6) Copy the text from the alert window.

heinz57g

Re: saving login names/passw into simple text file

Unread post by heinz57g » 2021-04-07, 08:35

.
coffebreak and kris_88, thanks a lot.

coffebreak, it actually IS a native function, for a single entry at a time - useless
when you need to copy 160+ entries. but i will try the extension you suggested,
.xml or .csv would be both fine for me - all i need is a paper backup.

kris_88 ... that solution with a script is prone to mistakes (i know me!), so i will
try it on a spare portable version first. once done, does it change anything with
the normal use of PM (meaning, do i have to remove or cancel it somehow), or
does it work for a single instance only, anyhow.

for both solutions, will try coming weekend - normal weekdays are too nervous
these days.

thanks again, and stay well - heinz -
.

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: saving login names/passw into simple text file

Unread post by Kris_88 » 2021-04-07, 09:29

heinz57g wrote:
2021-04-07, 08:35
once done, does it change anything with
the normal use of PM (meaning, do i have to remove or cancel it somehow), or
does it work for a single instance only, anyhow.
This script doesn't change anything in the browser (just reopen your browser). It shows a window with urls, names and passwords from which they can be copied. If you are satisfied with the add-on, then you do not need the script.

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

Re: saving login names/passw into simple text file

Unread post by coffeebreak » 2021-04-07, 13:59

heinz57g wrote:
2021-04-07, 08:35
coffebreak, it actually IS a native function, for a single entry at a time
You're right, my mistake.

User avatar
Bilbo47
Fanatic
Fanatic
Posts: 234
Joined: 2017-11-18, 04:24

Re: saving login names/passw into simple text file

Unread post by Bilbo47 » 2021-04-08, 17:34

That ECMAScript does not run for me. It gives

Code: Select all

TypeError: Components.classes is undefined
on line 1 column 5

Code: Select all

let sm = Components.classes[...

User avatar
Kris_88
Keeps coming back
Keeps coming back
Posts: 933
Joined: 2021-01-26, 11:18

Re: saving login names/passw into simple text file

Unread post by Kris_88 » 2021-04-08, 19:09

Bilbo47 wrote:
2021-04-08, 17:34

Code: Select all

TypeError: Components.classes is undefined
on line 1 column 5
3) Set "Environment" to "Browser"

User avatar
Bilbo47
Fanatic
Fanatic
Posts: 234
Joined: 2017-11-18, 04:24

Re: saving login names/passw into simple text file

Unread post by Bilbo47 » 2021-04-08, 21:09

By Jove, that did it! I had wrongly assumed that since Tools -> Web Developer was already showing 12 or 15 menu items, that the config switch devtools.chrome.enabled was already True. (The switch *was* already turned on in Borealis browser, and Tools -> Developer Tools showed only three items.) Without turning on that switch in Pale Moon, everything *looks like* it's ready, but the Environment menu does not appear.

New Tobin Paradigm

Re: saving login names/passw into simple text file

Unread post by New Tobin Paradigm » 2021-04-08, 21:40

God that build you have must be quite old. Also, as far as the scratchpad and the pref goes different application, different implementation, different defaults.

User avatar
Bilbo47
Fanatic
Fanatic
Posts: 234
Joined: 2017-11-18, 04:24

Re: saving login names/passw into simple text file

Unread post by Bilbo47 » 2021-04-11, 02:18

It is "Version: 0.9.7344a1 (64-bit) Build identifier: 20200210" so ... fourteen months old?

New Tobin Paradigm

Re: saving login names/passw into simple text file

Unread post by New Tobin Paradigm » 2021-04-11, 02:26

Yes. If you want a newer test build.. You know where to report to.

Locked