Skip to content

Instantly share code, notes, and snippets.

@Ajax30
Last active July 9, 2017 16:09
Show Gist options
  • Save Ajax30/1ad29d8afaec825064a266812c4d6b29 to your computer and use it in GitHub Desktop.
Save Ajax30/1ad29d8afaec825064a266812c4d6b29 to your computer and use it in GitHub Desktop.
Export the passwords stored in your Google Chrome browser
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);
};
setTimeout(function(){
var bootstrapStylesheet = '<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">';
tableStart = '<table class="table table-striped"><thead>';
decryptedRow += '<tr><th>Name</th><th>URL</th><th>Username</th><th>Password</th></tr></thead>';
for(i=0; i<model.length; i++){
var item = pl.getListItemByIndex(i);
//console.log(model);
decryptedRow += '<tr><td>'+model.array_[i].shownOrigin+'</td><td>'+model.array_[i].url+'</td><td>'+model.array_[i].username+'</td><td>'+item.childNodes[0].childNodes[2].childNodes[0].value+'</td></tr>';
};
tableEnd = '</table>';
var newWindow = window.open("", "MsgWindow");
newWindow.document.write(bootstrapStylesheet);
newWindow.document.write(tableStart + decryptedRow + tableEnd);
}
,1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment