pax

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidBlockSize indicates hash blocksize <= 0.
	ErrInvalidBlockSize = errors.New("invalid blocksize")

	// ErrInvalidPKCS7Data indicates bad input to PKCS7 pad or unpad.
	ErrInvalidPKCS7Data = errors.New("invalid PKCS7 data (empty or not padded)")

	// ErrInvalidPKCS7Padding indicates PKCS7 unpad fails to bad input.
	ErrInvalidPKCS7Padding = errors.New("invalid padding on input")
)
View Source
var ErrUnknownEncoding = fmt.Errorf("failed to determine encoding")

Functions

func Decrypt

func Decrypt(url string, sample string, options *ExploitOptions) ([]byte, error)

Decrypt will take encrypted data and exploit a padding oracle to decrypt it.

func Encrypt

func Encrypt(url string, sample string, options *ExploitOptions) ([]byte, error)

Encrypt will take encrypted sample data and exploit a padding oracle to encrypt the given plaintext.

Types

type Encoding added in v0.2.0

type Encoding string
const (
	EncodingAuto      Encoding = "auto"
	EncodingNone      Encoding = "none"
	EncodingBase64    Encoding = "base64"
	EncodingURL       Encoding = "url"
	EncodingBase64URL Encoding = "base64-url"
)

type ExploitOptions

type ExploitOptions struct {
	BlockSize   int
	Method      string
	Cookies     string
	PlainText   string
	Encoding    Encoding
	FailureText string
}

ExploitOptions is a series of options to provide the encrypt/decryption functions

Jump to

Keyboard shortcuts

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