phantomscript
v0.0.4
Published
convert strings to zero-width unicode or vice-versa
Downloads
23
Maintainers
Readme
____ _ _ _ _
| _ \| |__ __ _ _ __ | |_ ___ _ __ ___ ___ ___ _ __(_)_ __ | |_
| |_) | '_ \ / _` | '_ \| __/ _ \| '_ ` _ \/ __|/ __| '__| | '_ \| __|
| __/| | | | (_| | | | | || (_) | | | | | \__ \ (__| | | | |_) | |_
|_| |_| |_|\__,_|_| |_|\__\___/|_| |_| |_|___/\___|_| |_| .__/ \__|
|_|
A command-line implementation of the Phantomscript conversion described here
Contributions welcome!
Installation
yarn add phantomscript global
or
npm i phantomscript -g
This will give you access to the boo
executable, so you can convert to and from phantomscript with ease:
boo -e "butts" >> secrets.txt
You can see that it worked by using cat -v
: cat -v secrets.txt
will print all the unprintables.
Similarly, you can pull in that same data and decode it:
cat secrets.txt | boo -d
=> "butts"
If you feel like doing work but accomplishing nothing, you can alternate your pipes:
echo butts | boo -e | boo -d | boo -e | boo -d
=> "butts"
Use boo --help
for more information.
API
decode
convert a string from a zero-width representation
Parameters
payload
string a payload to decode
Returns string decoded string
encode
convert a string into a zero-width representation
Parameters
payload
string a payload to encode
Returns string encoded string
test
test whether a given input has zero-width characters in it
Parameters
whatever
string a string or something
Returns boolean whether the input has some zero-width characters in it
Contributing
This project is very much still in development, please feel free to submit issues or pull requests if this library doesn't do what you need it to.