bizip

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

README

bizip

Build Test

bizip is a command-line tool that allows users to unzip and combine zip files that are generated by Binalyze InterACT image command.

This tool is not for general-purpose zip file processing.

Installation

You can download the latest release of bizip from the releases section. Alternatively, you can install it from the source by running the following command in your terminal, if you are familiar with Go programming language.

go install github.com/binalyze/bizip/cmd/bizip@latest

Usage

After installing bizip, you can use it to unzip and combine zip files by running the following command in your terminal:

With Encryption (Unixes):

export PASSWORD="your_password"
./bizip --encrypted --unzip --input "inputs/image*.zip" --output output_file_path

Without Encryption (Unixes):

./bizip --unzip --input "inputs/image*.zip" --output output_file_path

With Encryption (Windows):

cmd.exe:

set PASSWORD=your_password
bizip.exe --encrypted --unzip --input "inputs\image*.zip" --output output_file_path

PowerShell:

$env:PASSWORD = 'your_password'
.\bizip.exe --encrypted --unzip --input "inputs\image*.zip" --output output_file_path

Without Encryption (Windows):

cmd.exe:

bizip.exe --unzip --input "inputs\image*.zip" --output output_file_path

PowerShell:

.\bizip.exe --unzip --input "inputs\image*.zip" --output output_file_path

Flags

  • --encrypted: If this flag is set, the input zip files are expected to be encrypted zip files. The password for decryption should be stored in the PASSWORD environment variable.
  • --unzip: If this flag is set, the output file will not be a zip file. If this flag is not set and the input zip files are encrypted, the output file will also be an encrypted zip file.
  • --input: The input zip files should be specified specified using the glob pattern. For example, "inputs/image*.zip" will match all files under inputs folder having image prefix with .zip file extension. Note that, matched files are sorted before processing.
  • --output: The output file path.

Help

To view a detailed help message, run the following command in your terminal:

./bizip --help

License

bizip is licensed under the Apache License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bizip

type Bizip struct {
	Input    string
	Output   string
	Password string
	Unzip    bool
	Log      LogFunc
	Progress ProgressFunc
	// contains filtered or unexported fields
}

Bizip is a struct that contains all the necessary information to unzip files.

func (*Bizip) UnzipFiles

func (bz *Bizip) UnzipFiles(ctx context.Context) error

UnzipFiles unzips files.

type LogFunc

type LogFunc func(format string, v ...interface{})

type ProgressFunc

type ProgressFunc func(unzipped, total int)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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