Skip to content

Instantly share code, notes, and snippets.

@kotobukid
Last active October 8, 2022 01:40
Show Gist options
  • Save kotobukid/85c83b634326d8a417c67e259f9df963 to your computer and use it in GitHub Desktop.
Save kotobukid/85c83b634326d8a417c67e259f9df963 to your computer and use it in GitHub Desktop.
Get the password stored in the web browser
javascript:(() => {const id_temp = 'hogegege'; const $pass = document.createElement('input'); $pass.setAttribute('type', 'password'); $pass.setAttribute('id', id_temp); $pass.cssText = 'position: absolute; top: 0; z-index: 10000000000000;'; document.getElementsByTagName('body')[0].appendChild($pass); $pass.addEventListener('click', (e) => { setTimeout(() => { alert(document.getElementById(id_temp).value); }, 2000); }, false); setTimeout(() => { $pass.focus(); }, 500);})();
(() => {
const id_temp = 'hogegege';
const $pass = document.createElement('input');
$pass.setAttribute('type', 'password');
$pass.setAttribute('id', id_temp);
$pass.cssText = 'position: absolute; top: 0; z-index: 10000000000000;';
document.getElementsByTagName('body')[0].appendChild($pass);
$pass.addEventListener('click', (e) => {
setTimeout(() => {
alert(document.getElementById(id_temp).value);
}, 2000);
}, false);
setTimeout(() => {
$pass.focus();
}, 500);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment