Have you even wanted to hide source code for some reason? Fear not, as we will go over on how to hide source code.
A few weeks/a month ago, I made a tool named JSBinTool. It transpiles JavaScript to a .bin file and back to JavaScript. But today I realized that anyone could read the .bin file by using the "binaryFileToString" function in it.
So I made a packager that decompiles the raw characters into JavaScript without using default JSBinTool functions and is encoded and split into characters, then writes it to a file named "jsbintool-packager-script.js".
The packager's "source code" (not really, it is obfuscated) is in packager.js. Usually, you would run:
npx jsbintool password.js --compile password.bin node packager password.bin
but in the REPL you could run:
bash package.sh
Once it is compiled and encoded, you would just have to reference it in a Script tag (like <script src="jsbintool-packager-script.js">
) and it would run the same code, nothing changed in it. Only difference is: it is unreadable and very hard to decode and get its source code. If you can, please let me know (please also add suggestion to hide it better) and I will get to it.
Thanks, and good day. (P.S: the password for the demo is 9327f84h)
Ydgg