https://github.com/irtsa-dev/zwpy
A python script for hiding secret text into public text utilizing zero-width encoding.
https://github.com/irtsa-dev/zwpy
Last synced: about 1 month ago
JSON representation
A python script for hiding secret text into public text utilizing zero-width encoding.
- Host: GitHub
- URL: https://github.com/irtsa-dev/zwpy
- Owner: irtsa-dev
- License: apache-2.0
- Created: 2024-03-21T14:41:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-21T01:45:38.000Z (almost 2 years ago)
- Last Synced: 2025-12-16T14:16:55.503Z (4 months ago)
- Language: Python
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
 
# **zwpy**
A [**python**](https://www.python.org) script for hiding secret text into public text utilizing zero-width encoding.
# Installation
With `git` [GitHub](https://github.com):
```
git clone https://github.com/irtsa-dev/zwpy.git
```
With `pip` [PyPi](https://pypi.org/project/idev-zwpy/)
```
pip install idev-zwpy
```
# Usage
### Within the CMD/Terminal
If installed with **GIT**:
```
python zwpy.py [-h] {encode,decode,find} ...
```
If installed with **PIP**:
```
zwpy [-h] {encode,decode,find} ...
```
Utilize `-h` or `--help` parameter for additional help.
```
usage: zwpy [-h] {encode,decode,find} ...
positional arguments:
{encode,decode,find}
encode Will encode secret text into public text using zero-width characters.
decode Will decode text to find a secret from zero-width characters.
find Will print out a boolean telling if zero-width characters are found in the text, flag exists
to print out how many characters were found.
options:
-h, --help show this help message and exit
```
```
usage: zwpy encode [-h] [-b BASE] [-k KEY] [-o OUTPUT] [-S] text secret
positional arguments:
text Text to be displayed publicly to the reader.
secret Text to be encoded into zero-width characters and hidden in the public text.
options:
-h, --help show this help message and exit
-b BASE, --base BASE Specifies the base the secret is to be encoded in.
-k KEY, --key KEY Specifies key to use for xor operation on the secret.
-o OUTPUT, --output OUTPUT
Specifies the output file name, if not provided the output will be printed out.
-S, --silent Disabled progress bars.
```
```
usage: zwpy decode [-h] [-b BASE] [-k KEY] [-o OUTPUT] [-S SILENT] text
positional arguments:
text Text that may contain zero-width characters.
options:
-h, --help show this help message and exit
-b BASE, --base BASE Specifies the base the secret is was encoded in.
-k KEY, --key KEY Specifies key to use for xor operation on the secret.
-o OUTPUT, --output OUTPUT
Specifies the output file name, if not provided the output will be printed out.
-S SILENT, --silent SILENT
Disabled progress bars.
```
```
usage: zwpy find [-h] [-c] text
positional arguments:
text Text that may contain zero-width characters.
options:
-h, --help show this help message and exit
-c, --count Will specify to output how many zero-width characters were found.
```
#### Additional Notes:
- The following are accepted encoding bases: `binary`, `trinary`, `quaternary`
# Examples
```
zwpy encode "hello there!" "test"
- Will encode "test" into zero-width characters and combine it with "hello there!"
```
```
zwpy encode -b trinary "hello there!" "test"
- Will encode "test" into zero-width characters in a base three (trinary) format before combining it with "hello there!"
```