Gateway Mods

This script adds some functions to speed up HP operations

当前为 2015-04-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Gateway Mods
  3. // @namespace http://www.hacker-project.com/
  4. // @version 0.9
  5. // @description This script adds some functions to speed up HP operations
  6. // @author Kevin Mitnick
  7. // @match http://www.hacker-project.com/*
  8. // @match http://hacker-project.com/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. function setup() {
  13. // Setup jQuery
  14. var jQueryScript = document.createElement("script");
  15. jQueryScript.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js");
  16. document.head.appendChild(jQueryScript);
  17.  
  18. var batchScript = document.createElement("script");
  19. batchScript.setAttribute("type", "text/javascript");
  20. batchScript.innerHTML = "function runPWB(pid, times) { for (var i = 0; i < times; i++) { var iframe = document.createElement('iframe'); iframe.src = 'index.php?action=gate&a2=run&pid='+pid; document.body.appendChild(iframe); } }";
  21. document.body.appendChild(batchScript);
  22. if (new String(window.location).indexOf("hacker-project.com/index.php?action=gate&a2=files") > -1) {
  23. var table = document.getElementsByName("frm_files")[0].getElementsByTagName("table")[0];
  24. for (var numberOfRows = table.rows.length, i = 1; i<numberOfRows-3; i++) {
  25. var tr = table.getElementsByTagName("tbody")[0].getElementsByTagName("tr")[i*3];
  26. var tds = tr.getElementsByTagName("td");
  27. var filename = tds[9].innerHTML;
  28. var versionPoint = 11;
  29. if (filename == "Password Break") versionPoint = 11;
  30. var version = parseFloat(tds[versionPoint].innerHTML);
  31.  
  32. // File type testing and calculations
  33. var hd, cpu, mem, band;
  34. switch (filename) {
  35. case "Firewall Protect":{ hd = 7.50; mem = 3000; cpu = 50; band = 0; break; }
  36. case "Firewall Bypass":{ hd = 37.50; mem = 7000; cpu = 80; band = 0; break; }
  37. case "Password Protect":{ hd = 8.50; mem = 5000; cpu = 100; band = 0; break; }
  38. case "Password break;":{ hd = 84.96; mem = 12500; cpu = 200; band = 0; break; }
  39. case "Hide Files":{ hd = 100.00; mem = 9000; cpu = 100; band = 0; break; }
  40. case "Unhide Files":{ hd = 200.00; mem = 9000; cpu = 100; band = 0; break; }
  41. case "Encryptor":{ hd = 341.80; mem = 30000; cpu = 600; band = 0; break; }
  42. case "Decryptor":{ hd = 439.45; mem = 40000; cpu = 900; band = 0; break; }
  43. case "SpyWare":{ hd = 50.00; mem = 900; cpu = 300; band = 0; break; }
  44. case "Anti-SpyWare":{ hd = 100.00; mem = 22500; cpu = 150; band = 0; break; }
  45. case "Malware Logic Bomb":{ hd = 585.94; mem = 5000; cpu = 300; band = 0; break; }
  46. case "Malware Overload Bomb":{ hd = 976.56; mem = 7000; cpu = 550; band = 0; break; }
  47. case "Malware Anti-Virus":{ hd = 200.00; mem = 1500; cpu = 300; band = 0; break; }
  48. case "Adware Spam Daemon":{ hd = 100.00; mem = 5000; cpu = 50; band = 3; break; }
  49. case "Adware Anti-Virus":{ hd = 174.22; mem = 10000; cpu = 250; band = 0; break; }
  50. case "File Share Virus":{ hd = 3200.00; mem = 10000; cpu = 250; band = 50; break; }
  51. case "File Share Anti-Virus":{ hd = 1000.00; mem = 20000; cpu = 500; band = 0; break; }
  52. case "Sniffer Daemon":{ hd = 151.17; mem = 3000; cpu = 50; band = 0; break; }
  53. case "IP Cloaker":{ hd = 151.17; mem = 6000; cpu = 100; band = 0; break; }
  54. case "IP Scanner":{ hd = 369.53; mem = 10000; cpu = 200; band = 0; break; }
  55. case "Scan Blocker":{ hd = 200.00; mem = 10000; cpu = 200; band = 0; break; }
  56. case "Data uplink hijack":{ hd = 395.31; mem = 20000; cpu = 300; band = 0; break; }
  57. case "Data hijack Anti-Virus":{ hd = 200.00; mem = 30000; cpu = 500; band = 0; break; }
  58. case "Log Deleter":{ hd = 5.00; mem = 1000; cpu = 30; band = 0; break; }
  59. case "Log UnDeleter":{ hd = 15.00; mem = 3000; cpu = 50; band = 0; break; }
  60. case "Virus break;er":{ hd = 174.21; mem = 11500; cpu = 300; band = 0; break; }
  61. case "Faith Anti-Virus":{ hd = 20000.00; mem = 1200000; cpu = 20000; band = 0; break; }
  62. case "Virus Identifier":{ hd = 17.42; mem = 1150; cpu = 30; band = 0; break; }
  63. case "Process Tracer":{ hd = 174.22; mem = 92000; cpu = 2400; band = 0; break; }
  64. case "Revelation Virus":{ hd = 20000.00; mem = 600000; cpu = 10000; band = 400; break; }
  65. case "Robber Baron Virus":{ hd = 96000.00; mem = 300000; cpu = 7500; band = 1500; break; }
  66. case "Robber Baron Anti-Virus":{ hd = 30000.00; mem = 600000; cpu = 15000; band = 0; break; }
  67. case "Remote Attack Disruptor":{ hd = 174.22; mem = 92000; cpu = 2400; band = 0; break; }
  68. case "IP Leech":{ hd = 75.00; mem = 1350; cpu = 450; band = 0; break; }
  69. case "IP Leech Anti-Virus":{ hd = 150.00; mem = 21600; cpu = 225; band = 0; break; }
  70. case "Remote Virus Injector":{ hd = 4000.00; mem = 125000; cpu = 2500; band = 2; break; }
  71. case "RV Injector Anti-Virus":{ hd = 4000.00; mem = 250000; cpu = 5000; band = 0; break; }
  72. case "Overload Signer":{ hd = 174.21; mem = 92000; cpu = 2400; band = 0; break; }
  73. case "Mutant Revelation Virus":{ hd = 96000.00; mem = 3000000; cpu = 50000; band = 2000; break; }
  74. case "MutantR Accelerator":{ hd = 174.21; mem = 92000; cpu = 2400; band = 100; break; }
  75. case "MutantR Decelerator":{ hd = 174.21; mem = 278000; cpu = 9600; band = 0; break; }
  76. case "MutantR Acc Stopper":{ hd = 174.21; mem = 46000; cpu = 1200; band = 0; break; }
  77. case "MutantR Dec Stopper":{ hd = 174.21; mem = 46000; cpu = 1200; band = 0; break; }
  78. }
  79. band = +band.toFixed(2);
  80. if (band===0) tds[versionPoint].innerHTML += ("<br/><small class='pi'> "+Math.round(version*cpu*10)+" MHz CPU, "+Math.round(version*mem*10)+" kB RAM</small>");
  81. else tds[versionPoint].innerHTML += ("<br/><small class='pi'> "+Math.round(version*cpu*10)+" MHz CPU, "+Math.round(version*mem*10)+" kB RAM, "+version*band*10+" kB/s Bandwidth</small>");
  82.  
  83. if (filename == "Password Break") {
  84. var buttonBox = tds[0];
  85. var buttonBody = buttonBox.getElementsByTagName("tbody")[0];
  86. var tad1 = document.createElement("td");
  87. buttonBody.getElementsByTagName("tr")[0].appendChild(tad1);
  88. var inputBox = document.createElement("input");
  89. inputBox.setAttribute("type", "number");
  90. inputBox.style.width = "50px";
  91. inputBox.id = "mpwb";
  92. tad1.appendChild(inputBox);
  93. var tad2 = document.createElement("td");
  94. buttonBody.getElementsByTagName("tr")[1].appendChild(tad2);
  95. var bbutton = document.createElement("a");
  96. bbutton.innerHTML = "Batch";
  97. var bhref = buttonBody.getElementsByTagName("a")[0].getAttribute("href");
  98. var pid = bhref.substring(bhref.indexOf("pid=")+4);
  99. bbutton.setAttribute("href", "javascript: runPWB("+pid+", document.getElementById('mpwb').value)");
  100. tad2.appendChild(bbutton);
  101. }
  102. }
  103. }
  104. }
  105. setup();