extractors

package
v0.0.0-...-79395b0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package extractors contains file extractors for various formats

Index

Constants

View Source
const (
	DT_CHR = 0x2
	DT_BLK = 0x6
	DT_DIR = 0x4
	DT_REG = 0x8
	DT_LNK = 0xa
)

these are in syscall but thats not available on Windows:

Variables

This section is empty.

Functions

func BinarySlice

func BinarySlice(e *types.Env, name string, positions ...uint64) (string, error)

BinarySlice creates a file from a slice

func MbrLba

func MbrLba(e *types.Env, name string) (string, error)

MbrLba extracts a drive based on LBA parameters in the MBR

func UnUimage

func UnUimage(e *types.Env, prefix string) (string, error)

UnUimage extracts u-boot uimage files

func Uncpio

func Uncpio(e *types.Env, prefix string) (string, error)

func Uncramfs

func Uncramfs(e *types.Env, prefix string) (string, error)

Uncramfs attempts to unpack a cramfs image.

This is a quick and dirty cramfs implementation and the cramfs tools that create these files seem to be very buggy so don't be surprised if this code fails to handle your images.

func Ungzip

func Ungzip(e *types.Env, prefix string) (string, error)

Ungzip extracts a gzip file

func Unjffs2

func Unjffs2(e *types.Env, prefix string) (string, error)

Unjffs2 will attempt to unpack a JFFS2 file

It is based on Woodhouse's paper + kernel headers.

NOTE: link files are created as regular files named <name>.link

func Untar

func Untar(e *types.Env, prefix string) (string, error)

func Unzip

func Unzip(e *types.Env, prefix string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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