tg

package
v0.0.0-...-5d0d25f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(name, data string) map[string]string

func Recv

func Recv(ctx context.Context, fsm marionette.FSM, args ...interface{}) error

func RegisterGrammar

func RegisterGrammar(grammar *Grammar)

RegisterGrammar adds grammar to the registry.

func Send

func Send(ctx context.Context, fsm marionette.FSM, args ...interface{}) error

Types

type AmazonMsgLensCipher

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

func NewAmazonMsgLensCipher

func NewAmazonMsgLensCipher(key, regex string) *AmazonMsgLensCipher

func (*AmazonMsgLensCipher) Capacity

func (h *AmazonMsgLensCipher) Capacity(fsm marionette.FSM) (int, error)

func (*AmazonMsgLensCipher) Decrypt

func (h *AmazonMsgLensCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*AmazonMsgLensCipher) Encrypt

func (h *AmazonMsgLensCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*AmazonMsgLensCipher) Key

func (h *AmazonMsgLensCipher) Key() string

type FTECipher

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

func NewFTECipher

func NewFTECipher(key, regex string, msgLen int, useCapacity bool) *FTECipher

func (*FTECipher) Capacity

func (c *FTECipher) Capacity(fsm marionette.FSM) (int, error)

func (*FTECipher) Decrypt

func (c *FTECipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*FTECipher) Encrypt

func (c *FTECipher) Encrypt(fsm marionette.FSM, template string, data []byte) (ciphertext []byte, err error)

func (*FTECipher) Key

func (c *FTECipher) Key() string

type Grammar

type Grammar struct {
	Name      string
	Templates []string
	Ciphers   []TemplateCipher
}

type HTTPContentLengthCipher

type HTTPContentLengthCipher struct{}

func NewHTTPContentLengthCipher

func NewHTTPContentLengthCipher() *HTTPContentLengthCipher

func (*HTTPContentLengthCipher) Capacity

func (c *HTTPContentLengthCipher) Capacity(fsm marionette.FSM) (int, error)

func (*HTTPContentLengthCipher) Decrypt

func (c *HTTPContentLengthCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*HTTPContentLengthCipher) Encrypt

func (c *HTTPContentLengthCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*HTTPContentLengthCipher) Key

type POP3ContentLengthCipher

type POP3ContentLengthCipher struct{}

func NewPOP3ContentLengthCipher

func NewPOP3ContentLengthCipher() *POP3ContentLengthCipher

func (*POP3ContentLengthCipher) Capacity

func (c *POP3ContentLengthCipher) Capacity(fsm marionette.FSM) (int, error)

func (*POP3ContentLengthCipher) Decrypt

func (c *POP3ContentLengthCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*POP3ContentLengthCipher) Encrypt

func (c *POP3ContentLengthCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*POP3ContentLengthCipher) Key

type RankerCipher

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

func NewRankerCipher

func NewRankerCipher(key, regex string, msgLen int) *RankerCipher

func (*RankerCipher) Capacity

func (c *RankerCipher) Capacity(fsm marionette.FSM) (int, error)

func (*RankerCipher) Decrypt

func (c *RankerCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*RankerCipher) Encrypt

func (c *RankerCipher) Encrypt(fsm marionette.FSM, template string, data []byte) (ciphertext []byte, err error)

func (*RankerCipher) Key

func (c *RankerCipher) Key() string

type SetDNSDomainCipher

type SetDNSDomainCipher struct{}

func NewSetDNSDomainCipher

func NewSetDNSDomainCipher() *SetDNSDomainCipher

func (*SetDNSDomainCipher) Capacity

func (c *SetDNSDomainCipher) Capacity(fsm marionette.FSM) (int, error)

func (*SetDNSDomainCipher) Decrypt

func (c *SetDNSDomainCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*SetDNSDomainCipher) Encrypt

func (c *SetDNSDomainCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*SetDNSDomainCipher) Key

func (c *SetDNSDomainCipher) Key() string

type SetDNSIPCipher

type SetDNSIPCipher struct{}

func NewSetDNSIPCipher

func NewSetDNSIPCipher() *SetDNSIPCipher

func (*SetDNSIPCipher) Capacity

func (c *SetDNSIPCipher) Capacity(fsm marionette.FSM) (int, error)

func (*SetDNSIPCipher) Decrypt

func (c *SetDNSIPCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*SetDNSIPCipher) Encrypt

func (c *SetDNSIPCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*SetDNSIPCipher) Key

func (c *SetDNSIPCipher) Key() string

type SetDNSTransactionIDCipher

type SetDNSTransactionIDCipher struct{}

func NewSetDNSTransactionIDCipher

func NewSetDNSTransactionIDCipher() *SetDNSTransactionIDCipher

func (*SetDNSTransactionIDCipher) Capacity

func (c *SetDNSTransactionIDCipher) Capacity(fsm marionette.FSM) (int, error)

func (*SetDNSTransactionIDCipher) Decrypt

func (c *SetDNSTransactionIDCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*SetDNSTransactionIDCipher) Encrypt

func (c *SetDNSTransactionIDCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*SetDNSTransactionIDCipher) Key

type SetFTPPasvXCipher

type SetFTPPasvXCipher struct{}

func NewSetFTPPasvXCipher

func NewSetFTPPasvXCipher() *SetFTPPasvXCipher

func (*SetFTPPasvXCipher) Capacity

func (c *SetFTPPasvXCipher) Capacity(fsm marionette.FSM) (int, error)

func (*SetFTPPasvXCipher) Decrypt

func (c *SetFTPPasvXCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*SetFTPPasvXCipher) Encrypt

func (c *SetFTPPasvXCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*SetFTPPasvXCipher) Key

func (c *SetFTPPasvXCipher) Key() string

type SetFTPPasvYCipher

type SetFTPPasvYCipher struct{}

func NewSetFTPPasvYCipher

func NewSetFTPPasvYCipher() *SetFTPPasvYCipher

func (*SetFTPPasvYCipher) Capacity

func (c *SetFTPPasvYCipher) Capacity(fsm marionette.FSM) (int, error)

func (*SetFTPPasvYCipher) Decrypt

func (c *SetFTPPasvYCipher) Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)

func (*SetFTPPasvYCipher) Encrypt

func (c *SetFTPPasvYCipher) Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)

func (*SetFTPPasvYCipher) Key

func (c *SetFTPPasvYCipher) Key() string

type TemplateCipher

type TemplateCipher interface {
	Key() string
	Capacity(fsm marionette.FSM) (int, error)
	Encrypt(fsm marionette.FSM, template string, plaintext []byte) (ciphertext []byte, err error)
	Decrypt(fsm marionette.FSM, ciphertext []byte) (plaintext []byte, err error)
}

Jump to

Keyboard shortcuts

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