Created
February 26, 2021 14:28
-
-
Save made-by-chris/2118b3db136ed4935083036948b2cc54 to your computer and use it in GitHub Desktop.
extract passwords from lastpass browser plugin when you forget master password
This file contains hidden or 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
const timeout = (ms) => new Promise((res) => setTimeout(res, ms)); | |
const items = document.querySelectorAll(".itemWrapper"); | |
console.log( | |
`duration: ${ | |
items.length * 4 | |
} seconds. password info will be copied to your clipboard (like copy/paste)` | |
); | |
const res = []; | |
async function go(i) { | |
var newItem = {}; | |
var item = items[i]; | |
item.querySelector(".itemButton.edit").click(); | |
await timeout(2000); | |
newItem.url = document.querySelector("#siteDialogName").value; | |
newItem.name = document.querySelector("#siteDialogUsername").value; | |
newItem.password = document.querySelector("#siteDialogPassword").value; | |
document.querySelector("#dialogOverlay").click(); | |
await timeout(2000); | |
console.log(newItem); | |
res.push(newItem); | |
if (i === count - 1) { | |
copy(res); | |
} else { | |
go(i + 1); | |
} | |
} | |
go(0); |
for sure yeh it could be maliciously used. I just needed to create something to retrieve my passwords after losing the master password, i hope this will help other people in the same situation. :D
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What?! Could this be abused?