BrU32

JS/CSS Webcam Obfusication SRC

Nov 26th, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. <style>
  2. body{
  3.  
  4. filter:invert(.5);
  5. }
  6. </style>
  7.  
  8. <center>
  9. <body bgcolor="black" onmousemove="drawe();" onmousedown="drawe" onchange="drawe" ondoubkeclick="drawe;">
  10. <video id="video" autoplay hidden>
  11. </video>
  12. <canvas id="canvas" onchange="drawe;" topmost=false onchange="drawe;" width="500" height="500" style="opacity:1.0;fillColor:none;">
  13. <script>
  14. var ii=1;
  15. var inn=244;
  16. var video = document.getElementById("video");
  17. var c = document.getElementById("canvas");
  18. var ctx = c.getContext("2d");
  19. var canvas = document.getElementById('canvas');
  20. var context = canvas.getContext('2d');
  21. var video = document.getElementById('video');
  22. var mediaConfig = { video: true,audio:false};
  23. function drawe(){
  24. var possible = "FABCGDE0123456789";
  25. var text = "";
  26. var canvas = document.getElementById("canvas");
  27. var ctx = canvas.getContext("2d");
  28. for(var i=0; i!=6; i++)
  29. text+=possible.charAt(Math.floor(Math.random()*possible.length))
  30. ctx.strokeStyle="#"+text;
  31.  
  32. ctx.topmost=true;
  33. text='';
  34. }
  35. navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
  36. if(ctx.width==500){event.mouseMove--;}
  37. video.src = this.window.URL.createObjectURL(stream);
  38. video.play();
  39. video.addEventListener("play", function() {i = window.setInterval(function() {
  40.  
  41. ctx.topmost=false;
  42.  
  43. ctx.drawImage(video,1,1)},30);
  44.  
  45.  
  46. ctx.draw();
  47.  
  48.  
  49. }, false);
  50. });
  51. </script>
Advertisement
Add Comment
Please, Sign In to add comment