common

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Contain home directory of current user
	UserHome = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")

	// Contain path to %APPDATA% directory
	AppData = os.Getenv("APPDATA")

	// Contain path to %LOCALAPPDATA% directory
	LocalAppData = os.Getenv("LOCALAPPDATA")
)

Functions

func CopyFile

func CopyFile(src string, dst string) error

Simple function for copying files

func ExecCommand

func ExecCommand(command string, params []string) string

Silent cmd exec. When using this function, the user will not see the CMD window

func OpensshKeyCheck

func OpensshKeyCheck(key []byte) bool

Check key for RFC 1421 compliance.

func PpkKeyCheck

func PpkKeyCheck(key []byte) bool

Ugly function for putty key format checking

func ReadKey

func ReadKey(keyPath string) []byte

Read key from file and return him

func Win32CryptUnprotectData

func Win32CryptUnprotectData(cipherText string, entropy bool) string

Function for decrypting data that has been encrypted with CryptProtectData from win cryptapi

Types

type DATA_BLOB

type DATA_BLOB struct {
	// contains filtered or unexported fields
}

WinAPI data blob structure

func NewBlob

func NewBlob(d []byte) *DATA_BLOB

func (*DATA_BLOB) ToByteArray

func (b *DATA_BLOB) ToByteArray() []byte

Transform WinApi data blob to byte array

type ExtractCredentialsNamePass

type ExtractCredentialsNamePass struct {
	Success bool
	Data    []NamePass
}

Structure for extracted credentials that contains status flag and data array

type ExtractCredentialsResult

type ExtractCredentialsResult struct {
	Success bool
	Data    []UrlNamePass
}

Structure for extracted credentials that contains status flag and data array

type NamePass

type NamePass struct {
	Name string
	Pass string
}

Structure for extracted credentials that contains only a login and password

type UrlNamePass

type UrlNamePass struct {
	Url      string
	Username string
	Pass     string
}

Structure for extracted credentials that contains a target url, login and password

Jump to

Keyboard shortcuts

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