stegjs
v2.0.6
Published
Encrypt message to PNG image.
Downloads
53
Maintainers
Readme
stegjs
Command-line utility for steganography in PNG images. With this application you can send secret messages, passwords or other important information.
Installation
To install globally you should enter in terminal window the following command:
$ npm i -g stegjs
Help
$ stegjs --help
Usage: stegjs <image or url>.png [mode] [message] [step] [output]
Encrypt you message to PNG image.
Options:
-h, --help output usage information
-V, --version output the version number
-e, --encode Change program mode to encode file.
-d, --decode Change program mode to decode file
Syntax information:
[mode] one of the two modes;
[message] the message you want to encrypt;
[step] pattern of the distribution message bits in the alpha channel of the image;
[output] path where to save the image with the encoded message.
Examples
The program works in two modes, encrypt and decrypt messages.
Encode
To encrypt a message use one of the following commands:
$ npx stegjs img.png -e "Meeting tonight at midnight under the light." 5x5
$ npx stegjs https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png -e "my_secret_pass" 1x1 ./secrets/go.png
$ npx stegjs nyan.png -e "🐱" 2x1
After that in the console, you will see the full path to the output image, message and pattern.
/Users/you/secrets/out.png has been encoded
message: 🐱
pattern: 2x1
Decode
To receive an encrypted message, specify the path to the image with the secret message and add the flag -d
.
$ npx stegjs out.png -d
After that in the console, you will see the information contained in the encrypted image.
out.png was decoded
message: 🐱
pattern: 2x1