smoothretro1982

wall bruteforcer (w.i.p) 2.6 (Updated for V3)

Apr 13th, 2026 (edited)
256
0
Never
3
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.76 KB | None | 0 0
  1. (function() {
  2. const CONFIG = {
  3. DEFAULT_LEN: 40,
  4. BATCH_SIZE: 8000,
  5. MAX_STORED: 1000,
  6. PAGE_SIZE: 5,
  7. UI: {
  8. PRIMARY: "#6e57ff",
  9. ACCENT: "#0fa",
  10. BG: "#0a0a0a",
  11. HEADER_BG: "#111",
  12. TEXT_MAIN: "#0f0",
  13. TEXT_LIGHT: "#fff",
  14. BORDER: "#222",
  15. GLOW: "0 0 30px #6e57ff66"
  16. },
  17. COORDS: {
  18. NICE: { x: 69420, y: -69420 },
  19. MYTHIC_NEAR: 100,
  20. MYTHIC_FAR: 199900
  21. }
  22. };
  23.  
  24. const ID = 'final-twin-hud';
  25. if (window.WF_INIT) return (document.getElementById(ID)?.remove(), window.WF_INIT = 0);
  26. window.WF_INIT = 1;
  27.  
  28. // Core variables
  29. let workers = [], urls = [], scanning = 0, paused = 0, buffer = [], cmap = new Map();
  30. let total = 0, lastH = 0, lastT = performance.now();
  31. let anyLength = false, currentPage = 0, pageSize = CONFIG.PAGE_SIZE, needsRender = false;
  32. let stats = { ax: 0, tw: 0, ni: 0, my: 0 };
  33. let sortMode = 'count';
  34. let dr = 0, ox, oy;
  35.  
  36. // Updated Logic String (Lr_01, Lr_02, Lr)
  37. const LrS = `
  38. function Lr_01(seed) {
  39. let key = [], s = [], j = 0, i = 0;
  40. seed = seed + "";
  41. for (let k = 0; k < seed.length; k++) {
  42. key[k & 255] = (key[k & 255] || 0) ^ seed.charCodeAt(k);
  43. }
  44. let keyLen = key.length || 1;
  45. for (let n = 0; n < 256; n++) s[n] = n;
  46. for (let n = 0; n < 256; n++) {
  47. j = (j + s[n] + key[n % keyLen]) & 255;
  48. [s[n], s[j]] = [s[j], s[n]];
  49. }
  50. function byte() {
  51. i = (i + 1) & 255;
  52. j = (j + s[i]) & 255;
  53. [s[i], s[j]] = [s[j], s[i]];
  54. return s[(s[i] + s[j]) & 255];
  55. }
  56. return function rand() {
  57. let num = 0, denom = 1;
  58. for (let k = 0; k < 6; k++) {
  59. num = num * 256 + byte();
  60. denom *= 256;
  61. }
  62. return num / denom;
  63. };
  64. }
  65.  
  66. function Lr_02(str) {
  67. let tpl = { maxX: 100000, maxY: 100000, text: str };
  68. let m = str.match(/^\\[(.*?)\\](.*)$/);
  69. if (!m) return tpl;
  70. let params = m[1].split(",");
  71. tpl.text = m[2];
  72. for (let p of params) {
  73. let [k, v] = p.split("=");
  74. if (!k || v == null) continue;
  75. k = k.trim(); v = v.trim();
  76. if (k === "maxX") tpl.maxX = Number(Math.min(v, 274000000));
  77. if (k === "maxY") tpl.maxY = Number(Math.min(v, 275000000));
  78. }
  79. return tpl;
  80. }
  81.  
  82. function Lr(input) {
  83. input = decodeURI((input || "").trim());
  84. if (!input) return { x: 0, y: 0 };
  85. let tpl = Lr_02(input);
  86. let rand = Lr_01(input);
  87. function axis(max, snap) {
  88. let raw = Math.round(2 * max * rand()) - max;
  89. return snap * Math.round(raw / snap);
  90. }
  91. return { x: axis(tpl.maxX, 20), y: axis(tpl.maxY, 10) };
  92. }
  93. `;
  94.  
  95. // UI Construction
  96. const hud = document.createElement('div');
  97. hud.id = ID;
  98. hud.style = `position:fixed;top:50px;right:20px;width:340px;background:${CONFIG.UI.BG};color:${CONFIG.UI.TEXT_MAIN};border:2px solid ${CONFIG.UI.PRIMARY};border-radius:12px;z-index:9999999;font-family:monospace;box-shadow:${CONFIG.UI.GLOW};display:flex;flex-direction:column;overflow:hidden;user-select:none`;
  99. hud.innerHTML = `
  100. <div id="wf-d" style="padding:12px;background:${CONFIG.UI.HEADER_BG};cursor:move;font-size:11px;display:flex;justify-content:space-between;border-bottom:1px solid ${CONFIG.UI.BORDER}">
  101. <span>walls found: <span id="wf-f" style="color:${CONFIG.UI.ACCENT}">(0)</span> <span id="wf-h" style="color:${CONFIG.UI.PRIMARY}">[0]</span></span>
  102. <div style="display:flex;gap:5px"><button id="wf-r" style="background:#222;color:${CONFIG.UI.TEXT_MAIN};border:1px solid #444;font-size:9px;cursor:pointer;padding:0 6px">RESTART</button><button id="wf-x" style="background:#411;color:#fff;border:none;cursor:pointer;width:20px;border-radius:4px">X</button></div>
  103. </div>
  104. <div style="padding:15px;display:flex;flex-direction:column;gap:10px">
  105. <div id="wf-s" style="font-size:14px;font-weight:bold;color:${CONFIG.UI.TEXT_LIGHT};text-align:center">0 HPS</div>
  106. <div style="background:${CONFIG.UI.HEADER_BG};height:4px;border-radius:2px;overflow:hidden"><div id="wf-p" style="width:0;height:100%;background:${CONFIG.UI.PRIMARY}"></div></div>
  107. <div style="background:${CONFIG.UI.HEADER_BG};padding:10px;border-radius:4px;font-size:10px;border:1px solid ${CONFIG.UI.BORDER}">
  108. <div style="display:flex;justify-content:space-between;color:${CONFIG.UI.TEXT_LIGHT};margin-bottom:4px">
  109. <span>MAX LENGTH: <span id="l-v" style="color:${CONFIG.UI.PRIMARY}">${CONFIG.DEFAULT_LEN}</span></span>
  110. <button id="wf-al" style="background:#222;color:${CONFIG.UI.PRIMARY};border:1px solid #444;font-size:9px;padding:1px 4px;cursor:pointer;border-radius:3px">ANY LENGTH: OFF</button>
  111. </div>
  112. <input type="range" id="wf-l" min="1" max="100" value="${CONFIG.DEFAULT_LEN}" style="width:100%;accent-color:${CONFIG.UI.PRIMARY};margin-bottom:10px">
  113. <div style="display:flex;flex-direction:column;gap:5px;margin-bottom:10px">
  114. <div style="display:flex;align-items:center;gap:8px"><input type="text" id="wf-q" placeholder="Target Word..." style="flex:1;background:#000;border:1px solid #333;color:${CONFIG.UI.TEXT_MAIN};padding:5px;font-size:11px;outline:none;border-radius:4px"><span id="wf-c" style="color:${CONFIG.UI.PRIMARY};font-weight:bold">(0)</span></div>
  115. <input type="text" id="wf-cp" placeholder="Custom Char Pool..." style="background:#000;border:1px solid #333;color:${CONFIG.UI.ACCENT};padding:5px;font-size:11px;outline:none;border-radius:4px">
  116. </div>
  117. <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;color:${CONFIG.UI.TEXT_LIGHT}">PLACEMENT: <select id="wf-pl" style="background:${CONFIG.UI.HEADER_BG};color:${CONFIG.UI.TEXT_MAIN};border:1px solid #333;font-size:10px;padding:2px"><option value="both">Both Sides</option><option value="before">Before Only</option><option value="after">After Only</option></select></div>
  118. <div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;color:${CONFIG.UI.TEXT_LIGHT}">SORT BY: <button id="wf-st" style="background:#222;color:${CONFIG.UI.PRIMARY};border:1px solid #444;font-size:9px;padding:2px 6px;cursor:pointer;border-radius:3px;min-width:80px">MOST FOUND</button></div>
  119. <div style="display:flex;justify-content:space-between;color:${CONFIG.UI.TEXT_LIGHT};text-align:center;font-size:9px">
  120. <label style="display:flex;flex-direction:column;align-items:center;gap:2px"><input type="checkbox" id="wf-ax"> AXIS<span id="st-ax" style="color:${CONFIG.UI.PRIMARY}">(0)</span></label>
  121. <label style="display:flex;flex-direction:column;align-items:center;gap:2px"><input type="checkbox" id="wf-tw" checked> TWIN<span id="st-tw" style="color:${CONFIG.UI.PRIMARY}">(0)</span></label>
  122. <label style="display:flex;flex-direction:column;align-items:center;gap:2px"><input type="checkbox" id="wf-ni"> NICE<span id="st-ni" style="color:${CONFIG.UI.PRIMARY}">(0)</span></label>
  123. <label style="display:flex;flex-direction:column;align-items:center;gap:2px"><input type="checkbox" id="wf-my"> MYTHIC<span id="st-my" style="color:${CONFIG.UI.PRIMARY}">(0)</span></label>
  124. </div>
  125. </div>
  126. <button id="wf-t" style="padding:10px;background:${CONFIG.UI.PRIMARY};color:${CONFIG.UI.TEXT_LIGHT};border:none;border-radius:4px;cursor:pointer;font-weight:bold">START SCAN</button>
  127. <div style="display:flex;gap:5px"><button id="wf-ca" style="flex:1;padding:8px;background:${CONFIG.UI.HEADER_BG};color:${CONFIG.UI.ACCENT};border:1px solid ${CONFIG.UI.BORDER};border-radius:4px;cursor:pointer;font-size:10px;font-weight:bold">COPY ALL</button><button id="wf-cl" style="flex:1;padding:8px;background:${CONFIG.UI.HEADER_BG};color:#f44;border:1px solid ${CONFIG.UI.BORDER};border-radius:4px;cursor:pointer;font-size:10px;font-weight:bold">CLEAR</button></div>
  128. <div style="display:flex;justify-content:space-between;align-items:center;padding:5px 0;background:#000;border-top:1px solid ${CONFIG.UI.BORDER}">
  129. <button id="wf-prev" style="background:#222;color:${CONFIG.UI.TEXT_LIGHT};border:1px solid #444;padding:4px 8px;cursor:pointer;font-size:10px;border-radius:4px">< PREV</button>
  130. <span id="wf-pg" style="font-size:10px;color:${CONFIG.UI.PRIMARY}">PAGE: 1</span>
  131. <button id="wf-next" style="background:#222;color:${CONFIG.UI.TEXT_LIGHT};border:1px solid #444;padding:4px 8px;cursor:pointer;font-size:10px;border-radius:4px">NEXT ></button>
  132. </div>
  133. <div id="wf-res" style="max-height:250px;min-height:100px;overflow-y:auto;border-top:1px solid ${CONFIG.UI.BORDER};background:#000;user-select:text"></div>
  134. </div>`;
  135. document.body.appendChild(hud);
  136.  
  137. const getE = id => document.getElementById(id);
  138.  
  139. // Worker Logic
  140. const blob = () => new Blob([`${LrS}
  141. const norm = "abcdefghijklmnopqrstuvwxyz0123456789".split("");
  142. const unic = Array.from({length:500},(_,i)=>String.fromCharCode(i+192));
  143. onmessage=e=>{
  144. const {batch,len,q,ax,tw,my,ni,p,pl,anyLen,cfg,pool} = e.data; if(p) return;
  145. const h=[];
  146. const customPool = pool ? [...pool] : null;
  147. for(let i=0;i<batch;i++){
  148. let w=q||"", useUnic=Math.random()>0.5;
  149. let targetLen = anyLen ? Math.floor(Math.random() * len) + 1 : len;
  150. while([...w].length<targetLen){
  151. let activePool = customPool ? customPool : (useUnic ? unic : norm);
  152. let c=activePool[Math.random()*activePool.length|0];
  153. if(pl == 'before') { w = c + w; }
  154. else if(pl == 'after') { w = w + c; }
  155. else { w = Math.random() > 0.5 ? c + w : w + c; }
  156. useUnic=!useUnic;
  157. }
  158. const o=Lr(w),s=Math.abs(o.x)+Math.abs(o.y),isNi=(o.x==cfg.COORDS.NICE.x||o.y==cfg.COORDS.NICE.y);
  159. const isAx=(o.x==0||o.y==0), isTw=(Math.abs(o.x)==Math.abs(o.y)), isMy=(s<cfg.COORDS.MYTHIC_NEAR||s>cfg.COORDS.MYTHIC_FAR);
  160. if((ax&&isAx)||(tw&&isTw)||(my&&isMy)||(ni&&isNi)) {
  161. h.push({w, k:\`\${o.x},\${-o.y}\`, d:o.x*o.x+o.y*o.y, n:isNi, ax:isAx, tw:isTw, my:isMy});
  162. }
  163. }
  164. postMessage({h,batch});
  165. }`], { type: "application/javascript" });
  166.  
  167. // Rest of initialization logic (Init, Stats, Rendering, Events, Dragging)
  168. const init = () => {
  169. workers.forEach(w => w.terminate());
  170. urls.forEach(u => URL.revokeObjectURL(u));
  171. workers = [], urls = [];
  172. const cores = Math.max(2, navigator.hardwareConcurrency || 4);
  173. for (let i = 0; i < cores; i++) {
  174. let u = URL.createObjectURL(blob());
  175. urls.push(u);
  176. let w = new Worker(u);
  177. w.onmessage = e => {
  178. if (!scanning) return;
  179. total += e.data.batch;
  180. if (e.data.h?.length && !paused) {
  181. buffer.push(...e.data.h);
  182. needsRender = true;
  183. }
  184. send(w);
  185. };
  186. workers.push(w);
  187. }
  188. };
  189.  
  190. const send = w => w.postMessage({
  191. batch: CONFIG.BATCH_SIZE, len: +getE('wf-l').value, q: getE('wf-q').value,
  192. pool: getE('wf-cp').value, pl: getE('wf-pl').value, ax: getE('wf-ax').checked,
  193. tw: getE('wf-tw').checked, my: getE('wf-my').checked, ni: getE('wf-ni').checked,
  194. p: paused, anyLen: anyLength, cfg: CONFIG
  195. });
  196.  
  197. const updateStats = () => {
  198. getE('st-ax').innerText = `(${stats.ax})`;
  199. getE('st-tw').innerText = `(${stats.tw})`;
  200. getE('st-ni').innerText = `(${stats.ni})`;
  201. getE('st-my').innerText = `(${stats.my})`;
  202. };
  203.  
  204. const renderResults = () => {
  205. const container = getE('wf-res');
  206. const fragment = document.createDocumentFragment();
  207. const allCoords = Array.from(cmap.entries()).sort((a, b) => {
  208. if (sortMode === 'count') return b[1].words.length - a[1].words.length;
  209. return a[1].d - b[1].d;
  210. });
  211. const pageItems = allCoords.slice(currentPage * pageSize, (currentPage + 1) * pageSize);
  212. pageItems.forEach(([k, data]) => {
  213. const {words, d, n, ax, tw, my} = data;
  214. const t = n ? "NICE" : tw ? "TWIN" : ax ? "AXIS" : my ? "MYTHIC" : "NRML";
  215. const c = n ? "#f0f" : `hsl(${Math.max(0,120-(Math.sqrt(d)/141421)*120)},100%,50%)`;
  216. const r = document.createElement('div');
  217. r.style = `padding:6px 8px;border-bottom:1px solid #111;font-size:10px;cursor:pointer;border-left:4px solid ${c};display:flex;align-items:flex-start;justify-content:space-between`;
  218. r.innerHTML = `<div style="flex:1;overflow:hidden;word-break:break-all;white-space:normal;padding-right:10px"><span style="color:${c};font-weight:bold">[${t}]</span>: <span style="color:${CONFIG.UI.PRIMARY}">(${k})</span>: <span style="color:${CONFIG.UI.TEXT_LIGHT}">(${words.length})</span> <span style="color:${CONFIG.UI.ACCENT}">(${words[0]})</span></div><button class="cs" style="background:#222;color:${CONFIG.UI.TEXT_LIGHT};border:1px solid #444;font-size:8px;padding:2px 4px;cursor:pointer;border-radius:3px;flex-shrink:0">SEED</button>`;
  219. r.onclick = e => {
  220. if (e.target.classList.contains('cs')) {
  221. navigator.clipboard.writeText(`(${k})\n[${t}]: (${words.length})\n${words.map(w => '/' + w).join('\n')}`);
  222. e.target.innerText = "COPIED!";
  223. setTimeout(() => e.target.innerText = "SEED", 800);
  224. } else {
  225. navigator.clipboard.writeText(`[${t}]: (${k}): (${words.length}) ${words.map(v=>`(${v})`).join(' ')}`);
  226. }
  227. };
  228. fragment.appendChild(r);
  229. });
  230. container.innerHTML = "";
  231. container.appendChild(fragment);
  232. getE('wf-pg').innerText = `PAGE: ${currentPage + 1} / ${Math.ceil(cmap.size / pageSize) || 1}`;
  233. needsRender = false;
  234. };
  235.  
  236. const loop = () => {
  237. if (!scanning || !getE(ID)) return;
  238. let now = performance.now();
  239. if (!paused && buffer.length) {
  240. let slice = buffer.splice(0, 200);
  241. for (let h of slice) {
  242. if (!cmap.has(h.k)) {
  243. if (cmap.size < CONFIG.MAX_STORED) {
  244. cmap.set(h.k, { words: [h.w], d: h.d, n: h.n, ax: h.ax, tw: h.tw, my: h.my });
  245. if (h.n) stats.ni++; if (h.tw) stats.tw++; if (h.ax) stats.ax++; if (h.my) stats.my++;
  246. updateStats();
  247. if (cmap.size >= CONFIG.MAX_STORED) {
  248. scanning = false;
  249. getE('wf-t').innerText = "START SCAN";
  250. break;
  251. }
  252. }
  253. } else {
  254. let data = cmap.get(h.k);
  255. if (!data.words.includes(h.w)) data.words.push(h.w);
  256. }
  257. }
  258. if (needsRender) renderResults();
  259. getE('wf-f').innerText = `(${cmap.size})`;
  260. const progress = (cmap.size / CONFIG.MAX_STORED) * 100;
  261. getE('wf-p').style.width = Math.min(100, progress) + '%';
  262. }
  263. if (now - lastT > 1000) {
  264. getE('wf-s').innerText = Math.round(total - lastH).toLocaleString() + ' HPS';
  265. getE('wf-h').innerText = `[${total.toLocaleString()}]`;
  266. lastT = now; lastH = total;
  267. }
  268. requestAnimationFrame(loop);
  269. };
  270.  
  271. // UI Listeners
  272. getE('wf-prev').onclick = () => { if (currentPage > 0) { currentPage--; renderResults(); } };
  273. getE('wf-next').onclick = () => { if ((currentPage + 1) * pageSize < cmap.size) { currentPage++; renderResults(); } };
  274. getE('wf-t').onclick = e => {
  275. scanning = !scanning;
  276. e.target.innerText = scanning ? "STOP SCAN" : "START SCAN";
  277. if (scanning) { workers.forEach(send); loop(); }
  278. };
  279. getE('wf-r').onclick = () => {
  280. cmap.clear(); buffer = []; stats={ax:0,tw:0,ni:0,my:0}; updateStats();
  281. getE('wf-res').innerHTML = ""; total = lastH = 0; currentPage = 0; init();
  282. };
  283. getE('wf-cl').onclick = () => {
  284. cmap.clear(); buffer = []; stats={ax:0,tw:0,ni:0,my:0}; updateStats();
  285. getE('wf-res').innerHTML = ""; getE('wf-f').innerText = "(0)"; currentPage = 0; renderResults();
  286. };
  287. getE('wf-ca').onclick = () => {
  288. let rows = Array.from(cmap.entries()).sort((a,b) => b[1].words.length - a[1].words.length).map(([k, data]) => {
  289. let type = data.n ? "NICE" : data.tw ? "TWIN" : data.ax ? "AXIS" : data.my ? "MYTHIC" : "NRML";
  290. return `[${type}]: (${k}): (${data.words.length}) ${data.words.map(v=>`(${v})`).join(' ')}`;
  291. });
  292. navigator.clipboard.writeText(rows.join('\n'));
  293. };
  294. getE('wf-x').onclick = () => {
  295. workers.forEach(w => w.terminate());
  296. urls.forEach(u => URL.revokeObjectURL(u));
  297. hud.remove(); window.WF_INIT = 0;
  298. };
  299. getE('wf-l').oninput = e => getE('l-v').innerText = e.target.value;
  300. getE('wf-q').oninput = e => getE('wf-c').innerText = `(${e.target.value.length})`;
  301. getE('wf-al').onclick = e => {
  302. anyLength = !anyLength;
  303. e.target.innerText = `ANY LENGTH: ${anyLength ? "ON" : "OFF"}`;
  304. e.target.style.color = anyLength ? CONFIG.UI.ACCENT : CONFIG.UI.PRIMARY;
  305. getE('wf-l').style.opacity = anyLength ? "0.5" : "1";
  306. };
  307. getE('wf-st').onclick = e => {
  308. sortMode = sortMode === 'count' ? 'dist' : 'count';
  309. e.target.innerText = sortMode === 'count' ? "MOST FOUND" : "DISTANCE";
  310. renderResults();
  311. };
  312. getE('wf-d').onmousedown = e => {
  313. dr = 1; ox = hud.offsetLeft - e.clientX;
  314. oy = hud.offsetTop - e.clientY; hud.style.right = 'auto';
  315. };
  316. window.addEventListener('mousemove', e => {
  317. if (dr) {
  318. hud.style.left = (e.clientX + ox) + 'px';
  319. hud.style.top = (e.clientY + oy) + 'px';
  320. }
  321. });
  322. window.addEventListener('mouseup', () => dr = 0);
  323.  
  324. init();
  325. })();
Advertisement
Comments
  • smoothretro1982
    107 days
    # text 0.29 KB | 0 0
    1. In case your wondering what HPS is, HPS stands for Hashes Per Second. It's the primary metric for measuring the speed and efficiency of the scanner. Essentially, it tells you how many unique "guesses" (strings) the computer is generating and checking against the coordinate algorithm every second.
    2.  
  • RubixYT1
    88 days
    # text 0.04 KB | 0 0
    1. you should add a category for center walls :D
  • smoothretro1982
    72 days
    Comment was deleted
Add Comment
Please, Sign In to add comment