utils

package
v0.0.0-...-02d0221 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(ciphertext []byte, iv []byte, key []byte) ([]byte, error)

func AESEncrypt

func AESEncrypt(plaintext []byte, iv []byte, key []byte) ([]byte, error)

func AppendSlice

func AppendSlice(slice, slice2 []string) []string

func AppendString

func AppendString(slice []string, str string) []string

func CalcShellcode

func CalcShellcode() []byte

func CalculateSums

func CalculateSums(output_file string) (string, string, string, error)

func ConvertBytes

func ConvertBytes(dllBytes, functionHash, userData []byte) []byte

func ConvertDllBytesToShellcode

func ConvertDllBytesToShellcode(dll_bytes []byte, func_name string, data string) ([]byte, error)

func ConvertDllToShellcode

func ConvertDllToShellcode(dll_file string, func_name string, data string) ([]byte, error)

func Entropy

func Entropy(file string) (float64, error)

func GenerateIV

func GenerateIV() ([]byte, error)

func GetShellcodeFromFile

func GetShellcodeFromFile(file string) ([]byte, error)

func GetShellcodeFromUrl

func GetShellcodeFromUrl(sc_url string) ([]byte, error)

func Md5

func Md5(src string) string

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5Trimming

func PKCS5Trimming(encrypt []byte) []byte

func RandomInt

func RandomInt(min, max int) int

Generate a random integer between range

func RandomString

func RandomString(n int) string

Return random string on n length

func Rc4Decrypt

func Rc4Decrypt(ciphertext []byte, psk []byte) ([]byte, error)

func Rc4Encrypt

func Rc4Encrypt(plaintext []byte, psk []byte) ([]byte, error)

func Sha1

func Sha1(src string) string

func Sha256

func Sha256(src string) string

func TripleDesDecrypt

func TripleDesDecrypt(data, key []byte) ([]byte, error)

func TripleDesEncrypt

func TripleDesEncrypt(data, key []byte) ([]byte, error)

func Xor

func Xor(input, key []byte) (cipher []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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