Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Transforms any text to a zero width string thus making it invisible
- // Call with 2nd param true to decode invisible text into original
- // ------------------------------
- // masterleo@gmail.com 18/11/2021
- const ghost = ($,ǃ) => (($,ǃ,g,h,o,s,t)=>(
- [g][g][g]('λ={'+`${[][g](124)}`
- [o](/./g,(λ,x)=>λ[g][h](x))
- [o](/[^a-z\d+/=]/gi,'')
- [o](/./g,(λ,x)=>`"${λ}":"${s=λ[g][h](8288+x/16|0,8288+x%16)}","${s}":"${λ}",`)
- [o](/,$/,'};'))(), t=λ,
- ǃ.at() == 'e' ?
- btoa(window[ǃ]($))[o](/./g,λ=>t[λ]) :
- window[ǃ](atob($[o](/../g,λ=>t[λ])))
- ))
- ($,(ǃ?'de':'en')+'codeURI','constructor','fromCodePoint','replace');
- //make sample code invisible
- let hidden = ghost("open`https://youtu.be/dQw4w9WgXcQ`");
- console.log(hidden);
- //reveal hidden code
- let shown = ghost(hidden, true);
- console.log(shown, true);
- // execute
- \u0065val(shown);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement