Command-line utility for steganography in PNG images. With this application you can send secret messages, passwords or other important information.
To install globally you should enter in terminal window the following command:
$ npm i -g stegjs
$ 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.
The program works in two modes, encrypt and decrypt messages.
To encrypt a message use one of the following commands:
$ stegjs img.png -e 'Meeting tonight at midnight under the light.' 5x5
$ stegjs https://google.com/img.png -e 'Xod(}bgwh2^j7>B8X' 1x1 ./secrets/go.png
$ 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
To receive an encrypted message, specify the path to the image with the secret message and add the flag -d
.
$ 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