Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php header("Access-Control-Allow-Origin: *"); ?>
  2.  
  3. <html>
  4. <head>
  5.  
  6. <script>
  7.  
  8. function success(response){
  9.     document.getElementById("response").innerHTML = response;  
  10. }
  11.    
  12. window.onerror = function (message, url, line, column, error) {
  13.            
  14.     obj = {
  15.         'type':'error',
  16.         'message':message,             
  17.         'line':line,
  18.         'column':column
  19.     }
  20.     obj.url = (url != '') ? url : window.location.href;
  21.     obj.stack = (error != null) ? error.stack : null;
  22.     postAjax("/jserrors/logger.php", obj);
  23.    
  24.     return true;
  25. };
  26.  
  27. function postAjax(url, data) {
  28.     var params = Object.keys(data).map(
  29.         function(k){ return encodeURIComponent(k) + '=' + encodeURIComponent(data[k]) }
  30.     ).join('&');
  31.  
  32.     var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
  33.     xhr.open('POST', url, true);
  34.     xhr.onreadystatechange = function() {
  35.         if (xhr.readyState>3 && xhr.status==200) {}
  36.     };
  37.     xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
  38.     xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  39.     xhr.send(params);
  40.     return xhr;
  41. }
  42. </script>
  43.  
  44. <script src="http://www.jbcse.com/script.php" crossorigin="anonymous" onerror="alert();"></script>
  45.  
  46. </head>
  47. <body>
  48.  
  49. <div id="response"></div>
  50.  
  51. <script>
  52.  
  53. function a(){
  54.     b();
  55. }
  56.  
  57. function b(){
  58.     c();
  59. }
  60.  
  61. function c(){
  62.     derp();
  63. }
  64.  
  65. a();
  66.  
  67. </script>
  68.  
  69.  
  70. </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement