de LinuxmanR4, 2 años han pasado desde su publicación, escrito en JavaScript.
Insertar vínculo
  1. <script>
  2. document.captureEvents(Event.MOUSEMOVE)
  3.  
  4. var p = [];
  5.  
  6. /* var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#!$%&/=?¿¡<>,.-;:*"; */
  7. var chars = String.fromCharCode(33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126);
  8. chars = chars.split("");
  9.  
  10. function start(){
  11.     p = [];
  12. }
  13.  
  14. function stop(){
  15.     sum = 0;
  16.     for(i = 0; i < p.length; i++){
  17.         sum += Math.abs(1/Math.sin(p[i][0])+Math.sin(p[i][1]));
  18.     }
  19.     sum = Math.ceil(sum*1000)%94;
  20.     document.getElementById("scratch").innerHTML = sum;
  21.     document.getElementById("password").innerHTML += chars[sum];
  22. }
  23.  
  24. function store(event){
  25.     p[p.length] = [event.pageX,event.pageY];
  26. }
  27.  
  28. </script>
  29.