archive

package
v1.8.6 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractArchiveToTempDir

func ExtractArchiveToTempDir(ctx context.Context, path string) (string, error)

extractArchiveToTempDir creates a temporary directory and extracts the archive file for scanning.

func ExtractBz2

func ExtractBz2(ctx context.Context, d, f string) error

Extract Bz2 extracts bzip2 files.

func ExtractDeb

func ExtractDeb(ctx context.Context, d, f string) error

ExtractDeb extracts .deb packages.

func ExtractGzip

func ExtractGzip(ctx context.Context, d string, f string) error

extractGzip extracts .gz archives.

func ExtractRPM

func ExtractRPM(ctx context.Context, d, f string) error

extractRPM extracts .rpm packages.

func ExtractTar

func ExtractTar(ctx context.Context, d string, f string) error

extractTar extracts .apk and .tar* archives.

func ExtractUPX added in v1.8.0

func ExtractUPX(ctx context.Context, d, f string) error

func ExtractZip

func ExtractZip(ctx context.Context, d string, f string) error

ExtractZip extracts .jar and .zip archives.

func ExtractZlib

func ExtractZlib(ctx context.Context, d string, f string) error

extractZlib extracts extension-agnostic zlib-compressed files.

func ExtractionMethod

func ExtractionMethod(ext string) func(context.Context, string, string) error

func IsValidPath

func IsValidPath(target, dir string) bool

isValidPath checks if the target file is within the given directory.

func OCI

func OCI(ctx context.Context, path string) (string, error)

return a directory with the extracted image directories/files in it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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