/stegify

Golang写的LSB工具,据说能够把任何文件隐藏在图片中。

Primary LanguageGoMIT LicenseMIT

stegify

GoDoc Go Report Card cover.run Mentioned in Awesome Go

说明

这是一个用于将文件隐藏于图片的工具。 这种技术称为LSB (Least Significant Bit) steganography

演示

Carrier Data Result
Original File Encoded File Encoded File

The Result file contains the Data file hidden in it. And as you can see it is fully transparent.

安装

$ go get -u github.com/DimitarPetrov/stegify

用法

作为命令行工具

$ stegify -op encode -carrier <file-name> -data <file-name> -result <file-name>
$ stegify -op decode -carrier <file-name> -result <file-name>

When encoding, the file with name given to flag -data is hidden inside the file with name given to flag -carrier and the resulting file is saved in new file in the current working directory under the name given to flag -result. The file extension of result file is inherited from the carrier file and must not be specified explicitly in the -result flag.

When decoding, given a file name of a carrier file with previously encoded data in it, the data is extracted and saved in new file in the current working directory under the name given to flag -result. The result file won't have any file extension and therefore it should be specified explicitly in -result flag.

In both cases the flag -result could be omitted and it will be used the default file name: result

在代码中使用

你可以看看 godoc 中的详细信息。

说明

如果载体文件是jpeg或者jpg格式,在编码后返回的文件为png格式,尽管扩展名为jpeg或者jpg。