-3

(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();
    });
});


HackerLOL
  • 1
  • 1
  • And what exactly isn’t working as expected in your code? It’s not clear what specifically you’re asking. Please elaborate on the specific problem you’ve encountered and the specific question you’re asking. – David Aug 26 '23 at 20:01
  • Oop yeah the thing is that I dont know where to start with my code, like what I need to accomplish what I want. Im not sure how to explain it well but for example, if I sent the website link to someone, and they typed there information, I want to see what they typed on my console by key logging them. What kind of code or coding language would I need to accomplish this? Where do I start? – HackerLOL Aug 26 '23 at 21:01
  • Well, at its simplest you’d start with introductory tutorials on JavaScript and HTML. The question above appears to have code already, which implies that you already have started. If you’ve encountered a specific problem in that attempt, we can help with that. If you’re looking to start over completely, then the question is far too broad to be meaningfully answered here and you are encouraged to make an attempt. – David Aug 26 '23 at 21:10
  • HTML and JS are run client-side. To log what the user is typing you would need a backend that actively receives data from the frontend for example with the usage of Method POST. – tacoshy Aug 26 '23 at 21:14

0 Answers0