Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How can I "print" the saved passwords list?

  • 14 balasan
  • 3 ada masalah ini
  • 220 paparan
  • Balasan terakhir oleh cor-el

more options

How can I print the "saved passwords" list

How can I print the "saved passwords" list

Penyelesaian terpilih

You can export the passwords to a signons.json file by evaluating code in the Browser Console (Firefox/Tools > Web Developer).

See:

You can open the Browser Console (Firefox/Tools > Web Developer). Paste the JavaScript code in the command line and press the Enter key to evaluate the code. Toggle devtools.chrome.enabled to true on the about:config page to enable the command line in the Browser Console.

You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

See this post further down for the JavaScript code.


You can open this file in the Scratchpad (Firefox/Tools > Web Developer). Click the "Pretty Print" button to format the file for readability.

Baca jawapan ini dalam konteks 👍 0

All Replies (14)

more options

Try to use Password Exporter 1.3.1.1-signed, export to xml and edit file to show only Username and Passwords or PrintScreen with show passwords.

I hope I helped you.

more options

I did as suggested, but the results are unreadable.

Thanks anyway,

more options

Penyelesaian Terpilih

You can export the passwords to a signons.json file by evaluating code in the Browser Console (Firefox/Tools > Web Developer).

See:

You can open the Browser Console (Firefox/Tools > Web Developer). Paste the JavaScript code in the command line and press the Enter key to evaluate the code. Toggle devtools.chrome.enabled to true on the about:config page to enable the command line in the Browser Console.

You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.

See this post further down for the JavaScript code.


You can open this file in the Scratchpad (Firefox/Tools > Web Developer). Click the "Pretty Print" button to format the file for readability.

Diubah oleh cor-el

more options

You can open the saved signons.json file in a Firefox tab and use this code in the command line of the Web Console (Firefox/Tools > Web Developer).

In case the builtin JSON viewer opens go to the Raw tab in the viewer or use the view-source: prefix (view-source:file://) in the location/address bar to get the raw code.


json = document.querySelector("pre").textContent;
var signons = JSON.parse(json);
var names = "";
for (var i=0; SG=signons[i]; i++) {
try {
 var host = SG.hostname||"";
 var user = SG.username||"";
 var pass = SG.password||"";
 names += "<tr><td>"+ (i+1) + "<td>" + host + "<td>" + user + "<td>" + pass;
} catch(e){}
}
var body = '<table border="1" cellspacing="0">\n'+
'<tr class="head">\n'+
'<td>#\n'+
'<td><b>Host</b>\n'+
'<td><b>User name</b>\n'+
'<td><b>Password</b>\n'+
names+
'</table>\n';

document.body.innerHTML = body;

Diubah oleh cor-el

more options

WHAT happened to SIMPLe printscrn to capture logins and paswords then use paint to print...that used to work but has problems now? the above solution instructs to do something that is not understandable to average user. please try to find and provide a solution for all of us dummies?

more options

in addition to above request..I tried "password exporter" i think was the name but after exporting to file in documents with .xml suffix and try to edit it bring MORE gibberish "schema" which no one know how to use..sadly. please try to provide SIMPLE solution..thanks so much

more options

Marinusi said

Try to use Password Exporter 1.3.1.1-signed, export to xml and edit file to show only Username and Passwords or PrintScreen with show passwords. I hope I helped you.
more options

unable to edit .xml file onlywinds up offering mor gibberish that simple people like us do not understand the first thing about "schema" ad stuff like that..please try to povide simple solutio fo r simple people like us thank you

more options

You can use this code in the command line in the Browser Console to export the names and passwords to a file in JSON format. You need to set devtools.chrome.enabled to true on the about:config page to enable the command line.

You can open the about:config page via the location/address bar. You can accept the warning and click "I accept the risk!" to continue.

You need to open the Browser Console.

  • "3-bar" menu button or Tools -> Web Developer
  • paste the JavaScript code in the editor area
  • click Run to run the JavaScript code
  • click Inspect to inspect the result

The default file name is firefox-logins.json


/* export the names and passwords in JSON format to firefox-logins.json */
var tokendb = Cc["@mozilla.org/security/pk11tokendb;1"].createInstance(Ci.nsIPK11TokenDB);
var token = tokendb.getInternalKeyToken();

try {token.login(true)} catch(e) {Cu.reportError(e)}

if (!token.needsLogin() || token.isLoggedIn()) {
 var logins = Services.logins.getAllLogins();
 var json = JSON.stringify(logins, null, 1);

 var ps = Services.prompt;
 var txt = 'Logins: ' + logins.length;
 var obj = new Object; obj.value = json;

 if (ps.prompt(null, 'Logins - JSON', txt, obj, null, {})){
 var fp=Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
 fp.init(window,"",Ci.nsIFilePicker.modeSave);
 fp.defaultString = "firefox-logins.json";

 fp.open((rv) => {
 if (rv == Ci.nsIFilePicker.returnOK || rv == Ci.nsIFilePicker.returnReplace) {
 var fos = Cc['@mozilla.org/network/file-output-stream;1'].createInstance(Ci.nsIFileOutputStream);
 fos.init(fp.file, 0x02 | 0x08 | 0x20, 0666, 0);
 var converter = Cc['@mozilla.org/intl/converter-output-stream;1'].createInstance(Ci.nsIConverterOutputStream);

 converter.init(fos, 'UTF-8', 0, 0);
 converter.writeString(json);
 converter.close();
}})
}}

You can open this firefox-logins.json file in a Firefox tab. You can paste this code in command line in the Web Console.

  • "3-bar" menu button or Tools -> Web Developer

In case the builtin JSON viewer opens go to the Raw tab in the viewer or use the view-source: prefix (view-source:file://) in the location/address bar to get the raw code instead of formatted code in the builtin JSON viewer.


try{json = document.querySelector("pre").textContent;}
catch(e){json=prompt(e+"\n\nPaste JSON data","")}
var logins = JSON.parse(json);
var i,LG,names = "";
for (var i=0; LG=logins[i]; i++) {
try {
 var host = LG.hostname||"";
 var user = LG.username||"";
 var pass = LG.password||"";
 names += "<tr><td>"+ (i+1) + "<td>" + host + "<td>" + user + "<td>" + pass;
} catch(e){}
}
var body = '<table border="0" cellspacing="0">\n'+
'<tr class="head">\n'+
'<td>#\n'+
'<td><b>Host</b>\n'+
'<td><b>User name</b>\n'+
'<td><b>Password</b>\n'+
names+
'</table>\n';
document.body.innerHTML = body;

Diubah oleh cor-el

more options

rxtomsn said

WHAT happened to SIMPLe printscrn to capture logins and paswords then use paint to print...that used to work but has problems now? the above solution instructs to do something that is not understandable to average user. please try to find and provide a solution for all of us dummies?

Print Screen works for me in Firefox 43.0, to capture an image of the Login Manager panel.

more options

Yes, 43 does capture but I get the WHOLE desktop screen,with it . I only want/need the logins and passwords. any suggestions?

more options

THANKS A LOT...I will try it right away and let you know my results!

more options

Co-rel, I have been trying to copy/paste the code you sent but have not been able to PASTE in browser console.. I cleared console so it would only have pasted code but it refuses to accept paste! what am I doing wrong??? ireally thank you for trying to help such a dummy..

more options

Did you enable the command line in the Browser Console?

You can set devtools.chrome.enabled to true on the about:config page to enable this command line.

You may have to type some text to allow to paste text.

You can open the about:config page via the location/address bar. You can accept the warning and click "I'll be careful" to continue.