executil

package
v0.0.0-...-e4e936e Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 7 Imported by: 0

README

executil

The package contains various helpers to interact binary execution

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cmd string) (string, error)

Run the specified command in os shell (sh or powershell.exe) and return the output

func RunPS

func RunPS(cmd string) (string, error)

RunPS runs the specified command through powershell.exe

func RunSafe

func RunSafe(cmd ...string) (string, error)

RunSafe necessarily does not prevent command injection but prevents/limits damage to an extent "the os/exec package intentionally does not invoke the system shell and does not expand any glob patterns or handle other expansions, pipelines, or redirections typically done by shells" This also mitigates windows security risk in go<1.19. refer https://pkg.go.dev/os/exec

func RunSh

func RunSh(cmd ...string) (string, error)

RunSh the specified command through sh

Types

This section is empty.

Jump to

Keyboard shortcuts

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