Created
September 18, 2018 03:45
-
-
Save jscher2000/06e6e7487c5bd656040ce333e791a416 to your computer and use it in GitHub Desktop.
Dump Firefox Logins as CSV to Browser Console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run code in Browser Console after enabling Chrome Debugging -- | |
// about:config => devtools.chrome.enabled => true | |
try { | |
signons = Services.logins.getAllLogins(); | |
var csv = '"Site","Username","Password"'; | |
for (var i=0; i<signons.length; i++){ | |
csv += '\n'; | |
csv += signons[i].httpRealm ? | |
('"' + signons[i].hostname + ' (' + signons[i].httpRealm + ')","') : | |
'"' + signons[i].hostname + '","'; | |
csv += signons[i].username + '","' + signons[i].password + '"'; | |
} | |
console.log(csv); | |
} catch (err) { | |
console.log('Problem reading or outputting logins: '+err); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Developed in response to this support issue:
https://support.mozilla.org/questions/1234268
If you test it out, please report back on any glitches.