Documentation ¶
Index ¶
- Variables
- func Decode(payload string) (*packet, error)
- func Encode(data []byte) string
- func EncodeFile(filePath string) (chan string, error)
- func GenContentMsg(id uint32, offset uint32, data []byte) (string, error)
- func GenHeaderMsg(id uint32, name string, size uint32) (string, error)
- func NewReceiver(dir string) *receiver
- type Exfil
- type Uint32Slize
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ERR_PAYLOAD_INCOMPLETE = errors.New("Payload incomplete") TYPE_CONTENT packetType = 0 TYPE_HEADER packetType = 0x80000000 )
View Source
var ( Mapping = map[rune]rune{ 'A': 'α', 'B': 'β', 'C': 'π', 'D': 'δ', 'E': 'ε', 'F': 'ϝ', 'G': 'γ', 'H': 'σ', 'I': 'ι', 'J': 'φ', 'K': 'κ', 'L': 'λ', 'M': 'χ', 'N': 'ν', 'O': 'ο', 'P': 'θ', 'Q': 'ψ', 'R': 'ρ', 'S': 'ς', 'T': 'τ', 'U': 'μ', 'V': 'ω', 'W': 'Ϟ', 'X': 'ξ', 'Y': 'υ', 'Z': 'ζ', '+': 'ƕ', '/': 'η', } ReverseMapping map[rune]rune )
View Source
var ( ERR_EXISTS = errors.New("Id already in use") ERR_INCOMPLETE = errors.New("File is incomplete") ERR_NOT_DECLARED = errors.New("Id not declared") ERR_OUT_OF_BOUNDS = errors.New("Offset out of bounds") )
View Source
var Encoding = base64.StdEncoding.WithPadding(base64.NoPadding)
Encoding configures the base64 library
Functions ¶
func EncodeFile ¶
EncodeFile transforms a file into a series of messages
func GenContentMsg ¶
GenContentMsg generates a content message, transporting a chunk of the file
func GenHeaderMsg ¶
GenHeaderMsg generates a header message, announcing the file to the server
Types ¶
type Uint32Slize ¶
type Uint32Slize []uint32
Uint32Slize to make []uint32 sortable
func (Uint32Slize) Len ¶
func (p Uint32Slize) Len() int
func (Uint32Slize) Less ¶
func (p Uint32Slize) Less(i, j int) bool
func (Uint32Slize) Swap ¶
func (p Uint32Slize) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.