Skip to content

Instantly share code, notes, and snippets.

@betesh
Last active December 14, 2017 14:57
Show Gist options
  • Save betesh/408582efed012c8b79a379c6cf075525 to your computer and use it in GitHub Desktop.
Save betesh/408582efed012c8b79a379c6cf075525 to your computer and use it in GitHub Desktop.
Export all your passwords from Google Chrome
/* Adapted from https://cmatskas.com/export-your-stored-passwords-from-chrome/
* 1. Go to chrome://settings-frame/passwords
* 2. Paste the following into the JS console:
*/
var decryptedRow="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
decryptEach = function(){
decryptedRow += '"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"';
for(i=0; i<model.length; i++){
var item = pl.getListItemByIndex(i);
decryptedRow += '<br/>"http://'+model.array_[i].shownOrigin+'","'+model.array_[i].username+'","';
decryptedRow += item.childNodes[0].childNodes[2].childNodes[0].value+'","http://'+model.array_[i].url+'"," "," "," "';
};
document.write(decryptedRow);
}
setTimeout(decryptEach, 300);
/*
* 3. The content of the page will be replaced by a list of passwords, in CSV format.
* Copy and paste to a file and save it as a CSV.
*/
@betesh
Copy link
Author

betesh commented Dec 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment