injection

package
v0.0.0-...-194db27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PNGHeader = "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A"

Variables

This section is empty.

Functions

func PrintChunks

func PrintChunks(chunks []Chunk)

PrintChunks prints chunk data to Stdout

func Rebuild

func Rebuild(chunks []Chunk, target string)

Rebuild will rebuild a PNG image from a Chunk slice, to the target file with 0644 permissions.

Types

type Chunk

type Chunk struct {
	Length []byte // chunk data length
	CType  []byte // chunk type
	Data   []byte // chunk data
	Crc32  []byte // CRC32 of chunk data
}

func GetChunks

func GetChunks(referenceFile *os.File) []Chunk

GetChunks takes the source file [referenceFile] and breaks down chunks into their sub-components, returns a Chunk slice.

func Inject

func Inject(chunks []Chunk, payload []Chunk) []Chunk

Inject will build a Chunk slice consisting of the source image chunks, and the payload. Payload position is randomised.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL