-
Notifications
You must be signed in to change notification settings - Fork 0
/
ConsoleTrace2-CAREFUL.js
5 lines (3 loc) · 1.67 KB
/
ConsoleTrace2-CAREFUL.js
1
2
3
4
5
Paste into console:
const scripts=[{name:"ArbitraryCodeInjection.js",execute:function(){let div=document.createElement('div');div.id='himom';let script=document.createElement('script');script.textContent='alert("Arbitrary Code Execution");';div.appendChild(script);document.body.appendChild(div);}},{name:"FuzzDOM-console.js",execute:function(){function randomFuzz(){const fuzzElement=(element)=>{const randomValue=Math.random().toString(36).substring(2,15);if(element.childNodes.length===0){element.textContent=randomValue;}else{element.childNodes.forEach(child=>fuzzElement(child));}};document.querySelectorAll('*').forEach(el=>fuzzElement(el));}function openFuzzedTabs(){const originalContent=document.documentElement.innerHTML;for(let i=0;i<10;i++){const newWindow=window.open('','_blank');if(newWindow){newWindow.document.write(originalContent);newWindow.document.close();newWindow.eval('('+randomFuzz.toString()+')();');}}}openFuzzedTabs();}},{name:"UnhideAllnonVisible.js",execute:function(){document.querySelectorAll('*').forEach(el=>{if(getComputedStyle(el).display==='none')el.style.display='block';});}}, {name:"ConsoleTrace.js",execute:(function(){const o=console.log;console.log=function(...args){o.apply(console, ['[Trace]', ...args]);};})()}];function selectAndRunScript(){scripts.forEach((script,index)=>{console.log(`${index+1}: ${script.name}`);});let choice=prompt("Enter the number of the script you want to run:");let index=parseInt(choice,10)-1;if(index>=0&&index<scripts.length){console.log(`Executing: ${scripts[index].name}`);scripts[index].execute();}else{console.error("Invalid selection. Please enter a valid number.");}}selectAndRunScript();
Select fuzzing / pollution method 1-4