util

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowedName

func AllowedName(name string) error

func ByteCountBinary

func ByteCountBinary(b int64) string

ByteCountBinary - Pretty print byte size

func ChmodR

func ChmodR(path string, filePerm, dirPerm os.FileMode) error

ChmodR - Recursively chmod

func Contains

func Contains[T comparable](elements []T, v T) bool

func CopyFile

func CopyFile(src string, dst string) error

CopyFile - Copy a file from src to dst

func DeflateBuf

func DeflateBuf(data []byte) []byte

DeflateBuf - Deflate a buffer using BestCompression (9)

func Keys

func Keys[M ~map[K]V, K comparable, V any](m M) []K

From the x/exp source code - gets a slice of keys for a map

func PreludeDecrypt

func PreludeDecrypt(data []byte, key []byte) []byte

PreludeDecrypt a command

func PreludeEncrypt

func PreludeEncrypt(data []byte, key []byte, iv []byte) []byte

PreludeEncrypt the results

func RC4EncryptUnsafe

func RC4EncryptUnsafe(data []byte, key []byte) []byte

RC4 encryption - Cryptographically insecure! Added for stage-listener shellcode obfuscation Dont use for anything else!

func ReadFileFromTarGz

func ReadFileFromTarGz(tarGzFile string, tarPath string) ([]byte, error)

ReadFileFromTarGz - Read a file from a tar.gz file in-memory

func RemoveElement

func RemoveElement(slice []uint64, value uint64) []uint64

func ResolvePath

func ResolvePath(in string) string

ResolvePath - Resolve a path from an assumed root path

Types

This section is empty.

Directories

Path Synopsis
basex
Package basex provides fast base encoding / decoding of any given alphabet using bitcoin style leading zero compression.
Package basex provides fast base encoding / decoding of any given alphabet using bitcoin style leading zero compression.
Package lib leakbuf.go is stolen form ss
Package lib leakbuf.go is stolen form ss
Package minisign implements the minisign signature scheme.
Package minisign implements the minisign signature scheme.

Jump to

Keyboard shortcuts

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