installer

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HostOS = Host{
	OS:   runtime.GOOS,
	Arch: runtime.GOARCH,
}

HostOS identifies the current host platform

View Source
var Updated bool

Global flag to track if apt-get update has been run

Functions

func AptGetInstallCmd

func AptGetInstallCmd(tool string)

AptGetInstallCmd runs the apt-get install <tool> command

func AptGetUpdateCmd

func AptGetUpdateCmd()

AptGetUpdateCmd runs the apt-get update command

func CheckToolExists

func CheckToolExists(tool string) bool

CheckToolExists checks that the tool exists with exec.LookPath (equivalent to `which <tool>`)

func Consent(tool string) rune

Consent asks for user consent to install a tool

func DownloadFileFromURL

func DownloadFileFromURL(url string, filepath string) error

DownloadFileFromURL downloads a file from url to the specified filepath.

func DownloadFromGithub

func DownloadFromGithub(toolFullPath, downloadURL string) error

DownloadFromGithub downloads a file from GitHub to toolFullPath.

func DownloadFromGithubAndInstall

func DownloadFromGithubAndInstall(tool string) (string, error)

DownloadFromGithubAndInstall downloads and installs a tool from GitHub.

func DpkgIsPackageInstalled

func DpkgIsPackageInstalled(pkg string) bool

func FetchAndDownloadLatestVersionFromGitHub

func FetchAndDownloadLatestVersionFromGitHub(tool string) (string, string, error)

FetchAndDownloadLatestVersionFromGitHub fetches the latest release from GitHub and downloads the tool.

func GetDownloadURL

func GetDownloadURL(tool string, latest Release) (string, error)

GetDownloadURL returns the download URL for the tool matching the host platform.

func InstallBinary

func InstallBinary(tool, extractedBinaryPath string) (string, error)

InstallBinary installs a binary to the system PATH.

func InstallConda

func InstallConda() error

InstallConda downloads and installs Conda/Miniconda.

func InstallGCPIAMBrute

func InstallGCPIAMBrute() error

InstallGCPIAMBrute installs gcp-iam-brute and its role definitions. Uses ~/.local paths when not running as root. If the install directory already exists, only the wrapper is (re)created to avoid hanging on pip/network operations for an already-present installation.

func InstallMissingTools

func InstallMissingTools(kind rune, optInstall *bool)

InstallMissingTools instructs the program to try and install tools that are absent from the pentesting distro. Case 'c' installs key cloud tools Case 'i' installs key infra tools

func OSCPConsent

func OSCPConsent(tool string) rune

OSCPConsent asks for user consent to run any forbidden tool for OSCP

func PrintInstallingTool

func PrintInstallingTool(tool string)

func Unzip

func Unzip(src, dest string) (string, error)

Unzip extracts all files from src into dest and returns the path of the last extracted entry.

Types

type Asset

type Asset struct {
	BrowserDownloadURL string `json:"browser_download_url"`
	Name               string `json:"name"`
}

Asset represents a GitHub release asset

type Host

type Host struct {
	OS   string
	Arch string
}

Host holds the OS and architecture of the host

type Release

type Release struct {
	Assets     []Asset `json:"assets"`
	ZipballURL string  `json:"zipball_url"`
}

Release represents a GitHub release

Jump to

Keyboard shortcuts

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