sig

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RegexCipherFactory = regexp.MustCompile(`(?s)var (\w+)={(\w+:function\([\w,]*?\){.*?},?)+}`)
	RegexCipherSteps   = regexp.MustCompile(`(?s)\w+?=function\(\w+?\){\w+?=\w+?\.split\(""\);((?:\w+?\.\w+?\(\w+?(?:,\d+?)?\);)*)return \w+?.join\(""\)};`)
	RegexCipherMethod  = regexp.MustCompile(`(?s)\w+?\.(\w+?)\(\w+?(?:,(\d+?))?\)`)

	RegexSliceOp   = regexp.MustCompile(`(?s)function\(\w+,\w+\){\w+\.splice\(0,\w+\)}`)
	RegexReverseOp = regexp.MustCompile(`(?s)function\(\w+\){\w+\.reverse\(\)}`)
	RegexSwapOp    = regexp.MustCompile(`(?s)function\(\w+,\w+\){var \w+=\w+\[0];\w+\[0]=\w+\[\w+%\w+\.length];\w+\[\w+%\w+\.length]=\w+}`)
)

Functions

This section is empty.

Types

type Cipher

type Cipher []Step

func LookupCipher

func LookupCipher(f CipherFactory, script string) (Cipher, error)

func (Cipher) Decode

func (cipher Cipher) Decode(s string) string

type CipherFactory

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

func LookupCipherFactory

func LookupCipherFactory(script string) (CipherFactory, error)

type Step

type Step func(s []byte) []byte

type StepType

type StepType uint8
const (
	SliceOp StepType = iota
	ReverseOp
	SwapOp
)

func (StepType) Instruction

func (c StepType) Instruction(param int) Step

func (StepType) String

func (c StepType) String() string

Jump to

Keyboard shortcuts

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