smoothretro1982

Hidden Page Finder

Mar 17th, 2026 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. (function () {
  2. if (document.getElementById("scannerHUD")) return;
  3.  
  4. // --- HUD UI ---
  5. const hud = document.createElement("div");
  6. hud.id = "scannerHUD";
  7. hud.style.cssText = `
  8. position: fixed;
  9. top: 20px;
  10. right: 20px;
  11. width: 320px;
  12. background: rgba(20,20,20,0.95);
  13. color: #0f0;
  14. font-family: monospace;
  15. font-size: 12px;
  16. border: 1px solid #0f0;
  17. border-radius: 10px;
  18. z-index: 999999;
  19. box-shadow: 0 0 15px #0f0;
  20. `;
  21.  
  22. hud.innerHTML = `
  23. <div id="hudHeader" style="padding:8px; cursor:move; border-bottom:1px solid #0f0;">
  24. 🔍 Hidden Scanner
  25. <button id="closeHUD" style="float:right;">X</button>
  26. </div>
  27. <div style="padding:8px;">
  28. <button id="startScan">Start</button>
  29. <button id="stopScan">Stop</button>
  30. <div id="progress">Idle</div>
  31. <div id="results" style="margin-top:8px; max-height:200px; overflow:auto;"></div>
  32. </div>
  33. `;
  34.  
  35. document.body.appendChild(hud);
  36.  
  37. // --- Dragging ---
  38. const header = document.getElementById("hudHeader");
  39. let isDragging = false, offsetX, offsetY;
  40.  
  41. header.onmousedown = (e) => {
  42. isDragging = true;
  43. offsetX = e.clientX - hud.offsetLeft;
  44. offsetY = e.clientY - hud.offsetTop;
  45. };
  46.  
  47. document.onmousemove = (e) => {
  48. if (isDragging) {
  49. hud.style.left = (e.clientX - offsetX) + "px";
  50. hud.style.top = (e.clientY - offsetY) + "px";
  51. hud.style.right = "auto";
  52. }
  53. };
  54.  
  55. document.onmouseup = () => isDragging = false;
  56.  
  57. // --- Logic ---
  58. const resultsDiv = document.getElementById("results");
  59. const progressDiv = document.getElementById("progress");
  60.  
  61. let running = false;
  62.  
  63. const delay = ms => new Promise(r => setTimeout(r, ms));
  64.  
  65. const baseWords = [
  66. "admin","login","dashboard","panel",
  67. "api","private","hidden",
  68. "test","dev","staging",
  69. "backup","old","temp",
  70. "config","settings","internal"
  71. ];
  72.  
  73. const generatePaths = () => {
  74. const set = new Set();
  75. baseWords.forEach(w => {
  76. set.add(w);
  77. set.add(w+"1");
  78. set.add(w+"-old");
  79. set.add(w+"_backup");
  80. set.add(w+"/v1");
  81. });
  82. return [...set];
  83. };
  84.  
  85. const isRealPage = (text) => {
  86. const t = text.toLowerCase();
  87. return !(t.includes("not found") || t.includes("404") || t.length < 50);
  88. };
  89.  
  90. const addResult = (text) => {
  91. const div = document.createElement("div");
  92. div.textContent = text;
  93. resultsDiv.appendChild(div);
  94. resultsDiv.scrollTop = resultsDiv.scrollHeight;
  95. };
  96.  
  97. async function scan() {
  98. const paths = generatePaths();
  99. let count = 0;
  100.  
  101. for (const path of paths) {
  102. if (!running) break;
  103.  
  104. progressDiv.textContent = `Checking: ${path}`;
  105.  
  106. try {
  107. const res = await fetch("/" + path);
  108. const text = await res.text();
  109.  
  110. if (res.status === 200 && isRealPage(text)) {
  111. addResult("FOUND: /" + path);
  112. }
  113. } catch {}
  114.  
  115. count++;
  116. await delay(120);
  117. }
  118.  
  119. progressDiv.textContent = "Done";
  120. running = false;
  121. }
  122.  
  123. // --- Controls ---
  124. document.getElementById("startScan").onclick = () => {
  125. if (!running) {
  126. running = true;
  127. resultsDiv.innerHTML = "";
  128. scan();
  129. }
  130. };
  131.  
  132. document.getElementById("stopScan").onclick = () => {
  133. running = false;
  134. progressDiv.textContent = "Stopped";
  135. };
  136.  
  137. document.getElementById("closeHUD").onclick = () => {
  138. running = false;
  139. hud.remove();
  140. };
  141.  
  142. })();
Tags: textwall
Advertisement
Add Comment
Please, Sign In to add comment