Skip to content

px86/png-steganography-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PNG-Steganography Tool

About

This tool allows you to embed/extract arbitrary stream of bytes into/from a PNG image.

Compilation

make

or

g++ -Wall -Werror -std=c++17 src/main.cpp src/pngs.cpp src/crc.cpp -o pngs

To run the test,

make test

Usage

Run pngs --help

Usage: pngs [OPTIONS] <pngfile> <outfile>
<pngfile>           PNG file path
<outfile>           output file path

Options:
  --help            Print this help message
  --extract, -x VAL chunk type to be extracted
  --secret, -s VAL  path of file which is to be hidden

Example

Let’s say you have some message in a text file called secret.txt and a PNG image called image.png. And you want to hide this message inside of image.png and save the new image as output.png.

To do so, run

pngs --secret secret.txt image.png output.png

To extract the information from output.png, and save the text into a file called extracted-msg.txt, run

pngs --extract scrt output.png extracted-msg.txt