ops

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 126 Imported by: 0

Documentation

Overview

Package ops implements the CyberChef operations, each as a type satisfying github.com/roberson-io/cchef/core.Operation.

Every operation registers itself, so importing the package for its side effects is enough to make all of them available by name to a recipe:

import (
	"github.com/roberson-io/cchef/core"
	_ "github.com/roberson-io/cchef/ops"
)

r, _ := core.ParseRecipeConfig(`[{"op":"To Base64"}]`)
out, _ := r.Execute(core.NewDish([]byte("hello"), core.TypeByteArray))

An operation can also be named directly, which the compiler can check where a lookup by name cannot. Its arguments are positional and in the order the operation declares them, so github.com/roberson-io/cchef/core.DefaultArgs is the easy way to fill in the ones you do not care about:

op := ops.ToBase64{}
out, err := op.Run(core.NewDish([]byte("hello"), core.TypeByteArray),
	core.DefaultArgs(op.Args()))

Run assumes its arguments have already been checked; pass them through github.com/roberson-io/cchef/core.CoerceArgs first when they come from somewhere untrusted, which is what recipe execution does.

The operations follow CyberChef's behavior. Where cchef differs deliberately, AGENTS.md records what and why.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type A1Z26CipherDecode

type A1Z26CipherDecode struct{}

A1Z26CipherDecode converts alphabet-order numbers back into their corresponding alphabet characters (1=a ... 26=z).

func (A1Z26CipherDecode) Args

func (A1Z26CipherDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (A1Z26CipherDecode) Meta

func (A1Z26CipherDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (A1Z26CipherDecode) Run

func (A1Z26CipherDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type A1Z26CipherEncode

type A1Z26CipherEncode struct{}

A1Z26CipherEncode converts alphabet characters into their alphabet-order number (a=1 ... z=26), dropping non-alphabet characters.

func (A1Z26CipherEncode) Args

func (A1Z26CipherEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (A1Z26CipherEncode) Meta

func (A1Z26CipherEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (A1Z26CipherEncode) Run

func (A1Z26CipherEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ADD

type ADD struct{}

ADD adds a repeating key to each byte, mod 256.

func (ADD) Args

func (ADD) Args() []core.ArgDef

Args returns the argument definitions.

func (ADD) Meta

func (ADD) Meta() core.OpMeta

Meta returns the operation metadata.

func (ADD) Run

func (ADD) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the ADD.

type AESDecrypt

type AESDecrypt struct{}

AESDecrypt decrypts AES ciphertext in a selectable mode.

func (AESDecrypt) Args

func (AESDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (AESDecrypt) Meta

func (AESDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (AESDecrypt) Run

func (AESDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type AESEncrypt

type AESEncrypt struct{}

AESEncrypt encrypts input with AES in a selectable mode.

func (AESEncrypt) Args

func (AESEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (AESEncrypt) Meta

func (AESEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (AESEncrypt) Run

func (AESEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type AESKeyUnwrap

type AESKeyUnwrap struct{}

AESKeyUnwrap unwraps key material using the RFC3394 AES key-wrap algorithm.

func (AESKeyUnwrap) Args

func (AESKeyUnwrap) Args() []core.ArgDef

Args returns the argument definitions.

func (AESKeyUnwrap) Meta

func (AESKeyUnwrap) Meta() core.OpMeta

Meta returns the operation metadata.

func (AESKeyUnwrap) Run

func (AESKeyUnwrap) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the key unwrap.

type AESKeyWrap

type AESKeyWrap struct{}

AESKeyWrap wraps key material using the RFC3394 AES key-wrap algorithm.

func (AESKeyWrap) Args

func (AESKeyWrap) Args() []core.ArgDef

Args returns the argument definitions.

func (AESKeyWrap) Meta

func (AESKeyWrap) Meta() core.OpMeta

Meta returns the operation metadata.

func (AESKeyWrap) Run

func (AESKeyWrap) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the key wrap.

type AMFDecode

type AMFDecode struct{}

AMFDecode deserializes Action Message Format binary data into JSON.

func (AMFDecode) Args

func (AMFDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (AMFDecode) Meta

func (AMFDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (AMFDecode) Run

func (AMFDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes AMF bytes into a JSON string.

type AMFEncode

type AMFEncode struct{}

AMFEncode serializes JSON into Action Message Format binary data.

func (AMFEncode) Args

func (AMFEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (AMFEncode) Meta

func (AMFEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (AMFEncode) Run

func (AMFEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes a JSON string into AMF bytes.

type AND

type AND struct{}

AND ANDs the input with a repeating key.

func (AND) Args

func (AND) Args() []core.ArgDef

Args returns the argument definitions.

func (AND) Meta

func (AND) Meta() core.OpMeta

Meta returns the operation metadata.

func (AND) Run

func (AND) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the AND.

type AddLineNumbers

type AddLineNumbers struct{}

AddLineNumbers prefixes each line with its (offset) number.

func (AddLineNumbers) Args

func (AddLineNumbers) Args() []core.ArgDef

Args returns the argument definitions.

func (AddLineNumbers) Meta

func (AddLineNumbers) Meta() core.OpMeta

Meta returns the operation metadata.

func (AddLineNumbers) Run

func (AddLineNumbers) Run(in *core.Dish, args []any) (*core.Dish, error)

Run adds line numbers.

type AddTextToImage

type AddTextToImage struct{}

AddTextToImage draws text onto an image. Ported from CyberChef's Add Text To Image, which renders with Jimp from the 72px Roboto bitmap-font atlases; cchef embeds those same atlases and reproduces Jimp's glyph blitting, bicubic downscale and compositing, so the result is pixel-identical for lossless formats.

func (AddTextToImage) Args

func (AddTextToImage) Args() []core.ArgDef

Args returns the argument definitions.

func (AddTextToImage) Meta

func (AddTextToImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (AddTextToImage) Run

func (AddTextToImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run draws the text onto the image.

type Adler32

type Adler32 struct{}

Adler32 computes the Adler-32 checksum of the input.

func (Adler32) Args

func (Adler32) Args() []core.ArgDef

Args returns the argument definitions.

func (Adler32) Meta

func (Adler32) Meta() core.OpMeta

Meta returns the operation metadata.

func (Adler32) Run

func (Adler32) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the checksum.

type AffineCipherDecode

type AffineCipherDecode struct{}

AffineCipherDecode inverts the affine encoding: (y - b) * a⁻¹ % 26.

func (AffineCipherDecode) Args

func (AffineCipherDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (AffineCipherDecode) Meta

Meta returns the operation metadata.

func (AffineCipherDecode) Run

func (AffineCipherDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type AffineCipherEncode

type AffineCipherEncode struct{}

AffineCipherEncode maps each letter to (a*x + b) % 26.

func (AffineCipherEncode) Args

func (AffineCipherEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (AffineCipherEncode) Meta

Meta returns the operation metadata.

func (AffineCipherEncode) Run

func (AffineCipherEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type AlternatingCaps

type AlternatingCaps struct{}

AlternatingCaps applies aLtErNaTiNg capitalisation.

func (AlternatingCaps) Args

func (AlternatingCaps) Args() []core.ArgDef

Args returns the argument definitions.

func (AlternatingCaps) Meta

func (AlternatingCaps) Meta() core.OpMeta

Meta returns the operation metadata.

func (AlternatingCaps) Run

func (AlternatingCaps) Run(in *core.Dish, args []any) (*core.Dish, error)

Run alternates caps.

type AnalyseHash

type AnalyseHash struct{}

AnalyseHash guesses which hashing functions could have produced a given hash, based on its length.

func (AnalyseHash) Args

func (AnalyseHash) Args() []core.ArgDef

Args returns the argument definitions.

func (AnalyseHash) Meta

func (AnalyseHash) Meta() core.OpMeta

Meta returns the operation metadata.

func (AnalyseHash) Run

func (AnalyseHash) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run reports the hash's length and the candidate hashing functions.

type AnalyseUUID

type AnalyseUUID struct{}

AnalyseUUID reads the version and any embedded metadata back out of a UUID.

func (AnalyseUUID) Args

func (AnalyseUUID) Args() []core.ArgDef

Args returns the argument definitions.

func (AnalyseUUID) Meta

func (AnalyseUUID) Meta() core.OpMeta

Meta returns the operation metadata.

func (AnalyseUUID) Run

func (AnalyseUUID) Run(in *core.Dish, args []any) (*core.Dish, error)

Run analyses the UUID.

type Argon2

type Argon2 struct{}

Argon2 derives a hash from a password with the Argon2 KDF. It follows CyberChef's Argon2 (backed by the argon2-browser WASM): Argon2i and Argon2id use golang.org/x/crypto/argon2; Argon2d uses the in-repo implementation in argon2core.go. Output can be the PHC-encoded hash, hex or raw bytes.

func (Argon2) Args

func (Argon2) Args() []core.ArgDef

Args returns the argument definitions.

func (Argon2) Meta

func (Argon2) Meta() core.OpMeta

Meta returns the operation metadata.

func (Argon2) Run

func (Argon2) Run(in *core.Dish, args []any) (*core.Dish, error)

Run derives the Argon2 hash in the requested output format.

type Argon2Compare

type Argon2Compare struct{}

Argon2Compare tests whether the input password matches a given Argon2 encoded hash.

func (Argon2Compare) Args

func (Argon2Compare) Args() []core.ArgDef

Args returns the argument definitions.

func (Argon2Compare) Meta

func (Argon2Compare) Meta() core.OpMeta

Meta returns the operation metadata.

func (Argon2Compare) Run

func (Argon2Compare) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports whether the input password matches the encoded hash.

type AsconDecrypt

type AsconDecrypt struct{}

AsconDecrypt performs Ascon-AEAD128 authenticated decryption. Ported from CyberChef AsconDecrypt.mjs (which wraps the js-ascon package).

func (AsconDecrypt) Args

func (AsconDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (AsconDecrypt) Meta

func (AsconDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (AsconDecrypt) Run

func (AsconDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption, verifying the authentication tag.

type AsconEncrypt

type AsconEncrypt struct{}

AsconEncrypt performs Ascon-AEAD128 authenticated encryption. Ported from CyberChef AsconEncrypt.mjs (which wraps the js-ascon package).

func (AsconEncrypt) Args

func (AsconEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (AsconEncrypt) Meta

func (AsconEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (AsconEncrypt) Run

func (AsconEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type AsconHash

type AsconHash struct{}

AsconHash computes the Ascon-Hash256 digest (NIST SP 800-232). Ported from CyberChef AsconHash.mjs (which wraps the js-ascon package).

func (AsconHash) Args

func (AsconHash) Args() []core.ArgDef

Args returns the argument definitions.

func (AsconHash) Meta

func (AsconHash) Meta() core.OpMeta

Meta returns the operation metadata.

func (AsconHash) Run

func (AsconHash) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the Ascon-Hash256 digest.

type AsconMAC

type AsconMAC struct{}

AsconMAC computes the Ascon-Mac message authentication code (NIST SP 800-232). Ported from CyberChef AsconMAC.mjs (which wraps the vendored ascon.mjs).

func (AsconMAC) Args

func (AsconMAC) Args() []core.ArgDef

Args returns the argument definitions.

func (AsconMAC) Meta

func (AsconMAC) Meta() core.OpMeta

Meta returns the operation metadata.

func (AsconMAC) Run

func (AsconMAC) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the Ascon-Mac tag.

type AtbashCipher

type AtbashCipher struct{}

AtbashCipher maps each letter to its mirror in the alphabet (a<->z, b<->y). It is the affine cipher with a=25, b=25, and is its own inverse.

func (AtbashCipher) Args

func (AtbashCipher) Args() []core.ArgDef

Args returns the argument definitions.

func (AtbashCipher) Meta

func (AtbashCipher) Meta() core.OpMeta

Meta returns the operation metadata.

func (AtbashCipher) Run

func (AtbashCipher) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the cipher. Ported from CyberChef AtbashCipher.mjs, which calls affineEncode(input, [25, 25]).

type AutomatedValidationTestOp

type AutomatedValidationTestOp struct{}

AutomatedValidationTestOp does nothing but report that its arguments were acceptable. It exists so that the checks on arguments can be exercised end to end: every kind of limit an argument may carry is declared here, so a recipe that names this operation is really a test of the checker.

func (AutomatedValidationTestOp) Args

Args returns the argument definitions, one for each kind of limit.

func (AutomatedValidationTestOp) Meta

Meta returns the operation metadata.

func (AutomatedValidationTestOp) Run

func (AutomatedValidationTestOp) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports that the arguments were acceptable, which is all it has to say: anything wrong with them is caught before it is reached.

type AvroToJSON

type AvroToJSON struct{}

AvroToJSON converts Avro Object Container File data into JSON.

CyberChef's operation is a thin wrapper around the avsc npm library's BlockDecoder. This reads the Avro OCF format (BIP-less; see https://avro.apache.org/docs/1.11.1/specification/) that reproduces avsc's value representation: bytes/fixed render as Node Buffers ({"type":"Buffer","data":[...]}), records/maps keep field order, and unions are unwrapped unless ambiguous, in which case avsc's wrapUnions:"auto" wraps every non-null branch as {"<branchName>": value}.

func (AvroToJSON) Args

func (AvroToJSON) Args() []core.ArgDef

Args returns the argument definitions.

func (AvroToJSON) Meta

func (AvroToJSON) Meta() core.OpMeta

Meta returns the operation metadata.

func (AvroToJSON) Run

func (AvroToJSON) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the Avro input into JSON.

type BLAKE2b

type BLAKE2b struct{}

BLAKE2b computes the BLAKE2b hash (64-bit optimised) with an optional key, backed by golang.org/x/crypto/blake2b.

func (BLAKE2b) Args

func (BLAKE2b) Args() []core.ArgDef

Args returns the argument definitions.

func (BLAKE2b) Meta

func (BLAKE2b) Meta() core.OpMeta

Meta returns the operation metadata.

func (BLAKE2b) Run

func (BLAKE2b) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the BLAKE2b digest.

type BLAKE2s

type BLAKE2s struct{}

BLAKE2s computes the BLAKE2s hash (8- to 32-bit optimised) with an optional key. An implementation of RFC 7693: x/crypto/blake2s only offers 256-bit and keyed 128-bit digests, so it cannot produce the 160-bit / unkeyed 128-bit variants this operation needs.

func (BLAKE2s) Args

func (BLAKE2s) Args() []core.ArgDef

Args returns the argument definitions.

func (BLAKE2s) Meta

func (BLAKE2s) Meta() core.OpMeta

Meta returns the operation metadata.

func (BLAKE2s) Run

func (BLAKE2s) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the BLAKE2s digest.

type BLAKE3

type BLAKE3 struct{}

BLAKE3 hashes the input with BLAKE3, with an optional 32-byte key, producing a hex digest of the requested length. Ported from CyberChef BLAKE3.mjs (which wraps @noble/hashes); the algorithm is reimplemented from the BLAKE3 spec.

func (BLAKE3) Args

func (BLAKE3) Args() []core.ArgDef

Args returns the argument definitions.

func (BLAKE3) Meta

func (BLAKE3) Meta() core.OpMeta

Meta returns the operation metadata.

func (BLAKE3) Run

func (BLAKE3) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the BLAKE3 digest.

type BSONDeserialise

type BSONDeserialise struct{}

BSONDeserialise struct.

func (BSONDeserialise) Args

func (BSONDeserialise) Args() []core.ArgDef

Args returns the argument definitions.

func (BSONDeserialise) Meta

func (BSONDeserialise) Meta() core.OpMeta

Meta returns the operation metadata.

func (BSONDeserialise) Run

func (BSONDeserialise) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run deserialises BSON input to JSON.

type BSONSerialise

type BSONSerialise struct{}

BSONSerialise struct.

func (BSONSerialise) Args

func (BSONSerialise) Args() []core.ArgDef

Args returns the argument definitions.

func (BSONSerialise) Meta

func (BSONSerialise) Meta() core.OpMeta

Meta returns the operation metadata.

func (BSONSerialise) Run

func (BSONSerialise) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run serialises JSON input to BSON.

type BaconCipherDecode

type BaconCipherDecode struct{}

BaconCipherDecode recovers the concealed message.

func (BaconCipherDecode) Args

func (BaconCipherDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (BaconCipherDecode) Meta

func (BaconCipherDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (BaconCipherDecode) Run

func (BaconCipherDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type BaconCipherEncode

type BaconCipherEncode struct{}

BaconCipherEncode conceals a message as groups of five binary digits (or A/B), one per letter.

func (BaconCipherEncode) Args

func (BaconCipherEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (BaconCipherEncode) Meta

func (BaconCipherEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (BaconCipherEncode) Run

func (BaconCipherEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type Bcrypt

type Bcrypt struct{}

Bcrypt hashes the input password with a random salt.

func (Bcrypt) Args

func (Bcrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (Bcrypt) Meta

func (Bcrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (Bcrypt) Run

func (Bcrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates a bcrypt hash.

type BcryptCompare

type BcryptCompare struct{}

BcryptCompare tests whether the input matches the given bcrypt hash.

func (BcryptCompare) Args

func (BcryptCompare) Args() []core.ArgDef

Args returns the argument definitions.

func (BcryptCompare) Meta

func (BcryptCompare) Meta() core.OpMeta

Meta returns the operation metadata.

func (BcryptCompare) Run

func (BcryptCompare) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compares the password against the hash.

type BcryptParse

type BcryptParse struct{}

BcryptParse parses a bcrypt hash into its rounds, salt, and hash components.

func (BcryptParse) Args

func (BcryptParse) Args() []core.ArgDef

Args returns the argument definitions.

func (BcryptParse) Meta

func (BcryptParse) Meta() core.OpMeta

Meta returns the operation metadata.

func (BcryptParse) Run

func (BcryptParse) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the hash. The doubled "Error: " prefix matches CyberChef wrapping bcryptjs's already-"Error:"-prefixed message.

type BifidCipherDecode

type BifidCipherDecode struct{}

BifidCipherDecode deciphers Bifid-encoded text.

func (BifidCipherDecode) Args

func (BifidCipherDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (BifidCipherDecode) Meta

func (BifidCipherDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (BifidCipherDecode) Run

func (BifidCipherDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type BifidCipherEncode

type BifidCipherEncode struct{}

BifidCipherEncode enciphers text with the Bifid cipher.

func (BifidCipherEncode) Args

func (BifidCipherEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (BifidCipherEncode) Meta

func (BifidCipherEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (BifidCipherEncode) Run

func (BifidCipherEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type BitShiftLeft

type BitShiftLeft struct{}

BitShiftLeft shifts the bits in each byte left by a fixed amount.

func (BitShiftLeft) Args

func (BitShiftLeft) Args() []core.ArgDef

Args returns the argument definitions.

func (BitShiftLeft) Meta

func (BitShiftLeft) Meta() core.OpMeta

Meta returns the operation metadata.

func (BitShiftLeft) Run

func (BitShiftLeft) Run(in *core.Dish, args []any) (*core.Dish, error)

Run shifts each byte left.

type BitShiftRight

type BitShiftRight struct{}

BitShiftRight shifts the bits in each byte right by a fixed amount.

func (BitShiftRight) Args

func (BitShiftRight) Args() []core.ArgDef

Args returns the argument definitions.

func (BitShiftRight) Meta

func (BitShiftRight) Meta() core.OpMeta

Meta returns the operation metadata.

func (BitShiftRight) Run

func (BitShiftRight) Run(in *core.Dish, args []any) (*core.Dish, error)

Run shifts each byte right. Ported from CyberChef BitShiftRight.mjs: logical shifts fill with zeros, arithmetic shifts XOR the original sign bit back in.

type BlowfishDecrypt

type BlowfishDecrypt struct{}

BlowfishDecrypt decrypts Blowfish ciphertext.

func (BlowfishDecrypt) Args

func (BlowfishDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (BlowfishDecrypt) Meta

func (BlowfishDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (BlowfishDecrypt) Run

func (BlowfishDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type BlowfishEncrypt

type BlowfishEncrypt struct{}

BlowfishEncrypt encrypts input with the Blowfish block cipher.

func (BlowfishEncrypt) Args

func (BlowfishEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (BlowfishEncrypt) Meta

func (BlowfishEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (BlowfishEncrypt) Run

func (BlowfishEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type BlurImage

type BlurImage struct{}

BlurImage blurs an image with a fast box blur or a Gaussian blur.

func (BlurImage) Args

func (BlurImage) Args() []core.ArgDef

Args returns the argument definitions.

func (BlurImage) Meta

func (BlurImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (BlurImage) Run

func (BlurImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run blurs the image.

type Bombe

type Bombe struct{}

Bombe attacks Enigma with a single known rotor configuration.

func (Bombe) Args

func (Bombe) Args() []core.ArgDef

Args returns the argument definitions.

func (Bombe) Meta

func (Bombe) Meta() core.OpMeta

Meta returns the operation metadata.

func (Bombe) Run

func (Bombe) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the attack.

type Bzip2Compress

type Bzip2Compress struct{}

Bzip2Compress compresses the input into a bzip2 stream.

func (Bzip2Compress) Args

func (Bzip2Compress) Args() []core.ArgDef

Args returns the argument definitions.

func (Bzip2Compress) Meta

func (Bzip2Compress) Meta() core.OpMeta

Meta returns the operation metadata.

func (Bzip2Compress) Run

func (Bzip2Compress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compresses the input.

type Bzip2Decompress

type Bzip2Decompress struct{}

Bzip2Decompress reads a bzip2 stream back into the bytes it was made from.

func (Bzip2Decompress) Args

func (Bzip2Decompress) Args() []core.ArgDef

Args returns the argument definitions.

func (Bzip2Decompress) Meta

func (Bzip2Decompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (Bzip2Decompress) Run

func (Bzip2Decompress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input.

type CBORDecode

type CBORDecode struct{}

CBORDecode deserializes CBOR (RFC 8949) into JSON.

CyberChef wraps the `cbor` library's Cbor.decodeFirstSync; this reproduces its value model: byte strings render as Node Buffers, string-keyed maps keep their order (non-string keys collapse to {}), integers beyond MAX_SAFE_INTEGER and bignum tags become BigInts that fail to serialise, and date tags 0/1 render as ISO strings.

func (CBORDecode) Args

func (CBORDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (CBORDecode) Meta

func (CBORDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (CBORDecode) Run

func (CBORDecode) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decodes CBOR bytes into JSON.

type CBOREncode

type CBOREncode struct{}

CBOREncode serializes JSON into canonical CBOR (RFC 8949).

CyberChef wraps the `cbor` npm library's Cbor.encodeCanonical; this is a port of its canonical rules: shortest integer/float forms (including half-precision and the negative-zero special case), the MAX_SAFE_INTEGER-to-float fallback, and length-first map key ordering.

func (CBOREncode) Args

func (CBOREncode) Args() []core.ArgDef

Args returns the argument definitions.

func (CBOREncode) Meta

func (CBOREncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (CBOREncode) Run

func (CBOREncode) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run encodes JSON input into canonical CBOR bytes.

type CMAC

type CMAC struct{}

CMAC computes a block-cipher-based message authentication code (RFC 4493 / NIST SP 800-38B) using AES or Triple DES. Ported from CyberChef CMAC.mjs (which wraps node-forge for the cipher); the CMAC construction is the .mjs logic, over the standard crypto/aes and crypto/des primitives.

func (CMAC) Args

func (CMAC) Args() []core.ArgDef

Args returns the argument definitions.

func (CMAC) Meta

func (CMAC) Meta() core.OpMeta

Meta returns the operation metadata.

func (CMAC) Run

func (CMAC) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the CMAC.

type CRCChecksum

type CRCChecksum struct{}

CRCChecksum computes a Cyclic Redundancy Check. It follows CyberChef's CRCChecksum: ~170 named CRC variants plus a fully custom width/polynomial/ initialisation/reflection/xor configuration, using the Rocksoft parameterised model computed bit-by-bit over big integers (so arbitrary widths up to 82 bits work).

func (CRCChecksum) Args

func (CRCChecksum) Args() []core.ArgDef

Args returns the argument definitions.

func (CRCChecksum) Meta

func (CRCChecksum) Meta() core.OpMeta

Meta returns the operation metadata.

func (CRCChecksum) Run

func (CRCChecksum) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the selected CRC over the input bytes.

type CSSBeautify

type CSSBeautify struct{}

CSSBeautify struct.

func (CSSBeautify) Args

func (CSSBeautify) Args() []core.ArgDef

Args returns the argument definitions.

func (CSSBeautify) Meta

func (CSSBeautify) Meta() core.OpMeta

Meta returns the operation metadata.

func (CSSBeautify) Run

func (CSSBeautify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run beautifies the CSS input.

type CSSMinify

type CSSMinify struct{}

CSSMinify struct.

func (CSSMinify) Args

func (CSSMinify) Args() []core.ArgDef

Args returns the argument definitions.

func (CSSMinify) Meta

func (CSSMinify) Meta() core.OpMeta

Meta returns the operation metadata.

func (CSSMinify) Run

func (CSSMinify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run minifies the CSS input. Unless comments are preserved they are stripped first; then whitespace runs are collapsed to a single space and whitespace after {, }, ;, /* and */ is removed.

type CSSSelector

type CSSSelector struct{}

CSSSelector extracts information from an HTML document with a CSS selector. Ported from CyberChef CSSSelector.mjs, which wraps @xmldom/xmldom (a lenient XML DOM parser) and nwmatcher (a CSS3 selector engine): the matched nodes are serialized via the DOM's node.toString() and joined by a delimiter. cchef evaluates selection by translating the CSS selector to XPath (cssToXPath) over the parsed tree via antchfx/xpath, reproducing xmldom+nwmatcher's exact output.

Known minor divergences (all confined to inputs that essentially never occur in real, lowercase HTML):

  • Selectors that combine a mixed/upper-case type with a structural pseudo (e.g. "P:first-child" against "<P>") hit an nwmatcher code path that is case-sensitive for XML documents; cchef stays case-insensitive.
  • Serializing a namespace-prefixed element in isolation does not re-emit the ancestor's xmlns declaration.
  • CSS identifier escapes (e.g. "x\:item") are unsupported and error.

func (CSSSelector) Args

func (CSSSelector) Args() []core.ArgDef

Args returns the argument definitions.

func (CSSSelector) Meta

func (CSSSelector) Meta() core.OpMeta

Meta returns the operation metadata.

func (CSSSelector) Run

func (CSSSelector) Run(in *core.Dish, args []any) (*core.Dish, error)

Run selects nodes matching the CSS selector and joins their serializations.

type CSVToJSON

type CSVToJSON struct{}

CSVToJSON converts CSV text into JSON. It ports CyberChef's operation: parse the CSV with Utils.parseCSV (shared with To Table), then shape the rows as either an array of arrays or an array of header-keyed dictionaries.

func (CSVToJSON) Args

func (CSVToJSON) Args() []core.ArgDef

Args returns the argument definitions.

func (CSVToJSON) Meta

func (CSVToJSON) Meta() core.OpMeta

Meta returns the operation metadata.

func (CSVToJSON) Run

func (CSVToJSON) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the CSV input into JSON.

type CTPH

type CTPH struct{}

CTPH computes a Context Triggered Piecewise Hash (fuzzy hash). Ported from CyberChef CTPH.mjs (which wraps the non-standard ctph.js package); the algorithm is reimplemented from that package to match its output.

func (CTPH) Args

func (CTPH) Args() []core.ArgDef

Args returns the argument definitions.

func (CTPH) Meta

func (CTPH) Meta() core.OpMeta

Meta returns the operation metadata.

func (CTPH) Run

func (CTPH) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the CTPH digest.

type CaesarBoxCipher

type CaesarBoxCipher struct{}

CaesarBoxCipher is a transposition cipher: the message is written row-by-row into a box of a given height and read back column-by-column.

func (CaesarBoxCipher) Args

func (CaesarBoxCipher) Args() []core.ArgDef

Args returns the argument definitions.

func (CaesarBoxCipher) Meta

func (CaesarBoxCipher) Meta() core.OpMeta

Meta returns the operation metadata.

func (CaesarBoxCipher) Run

func (CaesarBoxCipher) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the cipher. Ported from CyberChef CaesarBoxCipher.mjs, which iterates UTF-16 code units (charAt/length), strips spaces, pads the box with NUL code units, then reads column-by-column skipping the padding.

type CaretMDecode

type CaretMDecode struct{}

CaretMDecode decodes caret-notation and M-notation escapes (as produced by tools such as `cat -v`).

func (CaretMDecode) Args

func (CaretMDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (CaretMDecode) Meta

func (CaretMDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (CaretMDecode) Run

func (CaretMDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input. Each input byte is treated as a character code (0-255), matching CyberChef's charCodeAt over its Latin-1 string view of the bytes.

type CartesianProduct

type CartesianProduct struct{}

CartesianProduct calculates the cartesian product of multiple sets.

func (CartesianProduct) Args

func (CartesianProduct) Args() []core.ArgDef

Args returns the argument definitions.

func (CartesianProduct) Meta

func (CartesianProduct) Meta() core.OpMeta

Meta returns the operation metadata.

func (CartesianProduct) Run

func (CartesianProduct) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the cartesian product of two or more sets, formatting each combination as "(a,b,...)".

type CetaceanCipherDecode

type CetaceanCipherDecode struct{}

CetaceanCipherDecode reverses CetaceanCipherEncode: each 16-'e'/'E' group is read back as a 16-bit code unit ('e' is 1, anything else is 0).

func (CetaceanCipherDecode) Args

func (CetaceanCipherDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (CetaceanCipherDecode) Meta

Meta returns the operation metadata.

func (CetaceanCipherDecode) Run

func (CetaceanCipherDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input. Ported from CyberChef CetaceanCipherDecode.mjs, which iterates code points: a space expands to the 16 bits of 0x20 (a space character), 'e' is a 1 bit and anything else is a 0 bit; every 16 bits form a code unit.

type CetaceanCipherEncode

type CetaceanCipherEncode struct{}

CetaceanCipherEncode encodes each UTF-16 code unit as its 16-bit binary representation, writing 'e' for a 1 bit and 'E' for a 0 bit.

func (CetaceanCipherEncode) Args

func (CetaceanCipherEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (CetaceanCipherEncode) Meta

Meta returns the operation metadata.

func (CetaceanCipherEncode) Run

func (CetaceanCipherEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input. Ported from CyberChef CetaceanCipherEncode.mjs, which maps over UTF-16 code units: a space passes through literally, otherwise the code unit's 16-bit binary becomes 'e' (1) / 'E' (0).

type ChaCha

type ChaCha struct{}

ChaCha is Daniel J. Bernstein's ChaCha stream cipher, in the parameterised form CyberChef ships: 16- or 32-byte key, 8- or 12-byte nonce (or an integer nonce), a counter, and 8/12/20 rounds.

func (ChaCha) Args

func (ChaCha) Args() []core.ArgDef

Args returns the argument definitions.

func (ChaCha) Meta

func (ChaCha) Meta() core.OpMeta

Meta returns the operation metadata.

func (ChaCha) Run

func (ChaCha) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the cipher.

type ChangeIPFormat

type ChangeIPFormat struct{}

ChangeIPFormat converts IPv4 addresses between dotted-decimal, decimal, octal and hex representations.

func (ChangeIPFormat) Args

func (ChangeIPFormat) Args() []core.ArgDef

Args returns the argument definitions.

func (ChangeIPFormat) Meta

func (ChangeIPFormat) Meta() core.OpMeta

Meta returns the operation metadata.

func (ChangeIPFormat) Run

func (ChangeIPFormat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the IP format.

type ChiSquare

type ChiSquare struct{}

ChiSquare measures how far the byte distribution strays from a flat one.

func (ChiSquare) Args

func (ChiSquare) Args() []core.ArgDef

Args returns the argument definitions.

func (ChiSquare) Meta

func (ChiSquare) Meta() core.OpMeta

Meta returns the operation metadata.

func (ChiSquare) Run

func (ChiSquare) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run measures the distribution. Each byte value contributes the square of how far its count strays from an even share, over that share; values that do not occur contribute nothing.

type CipherSaber2Decrypt

type CipherSaber2Decrypt struct{}

CipherSaber2Decrypt reverses CipherSaber2Encrypt: the first 10 input bytes are the IV and the remainder is the ciphertext.

func (CipherSaber2Decrypt) Args

func (CipherSaber2Decrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (CipherSaber2Decrypt) Meta

Meta returns the operation metadata.

func (CipherSaber2Decrypt) Run

func (CipherSaber2Decrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts the input. Ported from CyberChef CipherSaber2Decrypt.mjs: the first 10 input bytes are the IV, the remainder is the ciphertext.

type CipherSaber2Encrypt

type CipherSaber2Encrypt struct{}

CipherSaber2Encrypt encrypts with the CipherSaber-2 protocol (RC4 keyed with the key followed by a random 10-byte IV, mixed over N rounds).

func (CipherSaber2Encrypt) Args

func (CipherSaber2Encrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (CipherSaber2Encrypt) Meta

Meta returns the operation metadata.

func (CipherSaber2Encrypt) Run

func (CipherSaber2Encrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts the input. Ported from CyberChef CipherSaber2Encrypt.mjs: a random 10-byte IV is generated, prepended to the output, and used to key the cipher over the input.

type CitrixCTX1Decode

type CitrixCTX1Decode struct{}

CitrixCTX1Decode decodes a Citrix CTX1 password back to plaintext.

func (CitrixCTX1Decode) Args

func (CitrixCTX1Decode) Args() []core.ArgDef

Args returns the argument definitions.

func (CitrixCTX1Decode) Meta

func (CitrixCTX1Decode) Meta() core.OpMeta

Meta returns the operation metadata.

func (CitrixCTX1Decode) Run

func (CitrixCTX1Decode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input. Ported from CyberChef CitrixCTX1Decode.mjs: the hex-nibble pairs are folded back through the XOR chain (over the reversed input) and the resulting bytes are decoded as UTF-16LE.

type CitrixCTX1Encode

type CitrixCTX1Encode struct{}

CitrixCTX1Encode encodes a string to the Citrix CTX1 password format.

func (CitrixCTX1Encode) Args

func (CitrixCTX1Encode) Args() []core.ArgDef

Args returns the argument definitions.

func (CitrixCTX1Encode) Meta

func (CitrixCTX1Encode) Meta() core.OpMeta

Meta returns the operation metadata.

func (CitrixCTX1Encode) Run

func (CitrixCTX1Encode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input. Ported from CyberChef CitrixCTX1Encode.mjs: the input is UTF-16LE encoded, each byte is folded into a running XOR chain against 0xa5, and the two nibbles of each result byte are emitted as 'A'..'P'.

type Colossus

type Colossus struct{}

Colossus emulates the WW2 Colossus codebreaking computer.

func (Colossus) Args

func (Colossus) Args() []core.ArgDef

Args returns the argument definitions. The 57-slot layout matches CyberChef's args array index-for-index; the four "label" slots are display-only empty strings so downstream indices line up with the original operation.

func (Colossus) Meta

func (Colossus) Meta() core.OpMeta

Meta returns the operation metadata.

func (Colossus) Run

func (Colossus) Run(in *core.Dish, args []any) (*core.Dish, error)

Run emulates a Colossus run.

type Comment

type Comment struct{}

Comment is a note in a recipe.

func (Comment) Args

func (Comment) Args() []core.ArgDef

Args returns the comment text.

func (Comment) Meta

func (Comment) Meta() core.OpMeta

Meta returns the operation metadata.

func (Comment) Run

func (Comment) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through.

func (Comment) RunFlow

func (Comment) RunFlow(state *core.FlowState) error

RunFlow leaves the recipe alone.

type CompareCTPHHashes

type CompareCTPHHashes struct{}

CompareCTPHHashes compares two CTPH hashes, returning a 0–100 similarity.

func (CompareCTPHHashes) Args

func (CompareCTPHHashes) Args() []core.ArgDef

Args returns the argument definitions.

func (CompareCTPHHashes) Meta

func (CompareCTPHHashes) Meta() core.OpMeta

Meta returns the operation metadata.

func (CompareCTPHHashes) Run

func (CompareCTPHHashes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compares the two hashes.

type CompareSSDEEPHashes

type CompareSSDEEPHashes struct{}

CompareSSDEEPHashes compares two SSDEEP hashes, returning a 0–100 similarity.

func (CompareSSDEEPHashes) Args

func (CompareSSDEEPHashes) Args() []core.ArgDef

Args returns the argument definitions.

func (CompareSSDEEPHashes) Meta

Meta returns the operation metadata.

func (CompareSSDEEPHashes) Run

func (CompareSSDEEPHashes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compares the two hashes.

type ConditionalJump

type ConditionalJump struct{}

ConditionalJump moves execution to a label when the data matches.

func (ConditionalJump) Args

func (ConditionalJump) Args() []core.ArgDef

Args returns the test, whether to invert it, the label, and the jump allowance.

func (ConditionalJump) Meta

func (ConditionalJump) Meta() core.OpMeta

Meta returns the operation metadata.

func (ConditionalJump) Run

func (ConditionalJump) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through; outside a recipe there is nowhere to jump.

func (ConditionalJump) RunFlow

func (ConditionalJump) RunFlow(state *core.FlowState) error

RunFlow jumps when the data matches. An empty test never jumps, and unlike a refused jump it leaves the jump count alone, as upstream does.

type ContainImage

type ContainImage struct{}

ContainImage scales an image to fit within a bounding box, letterboxing it.

func (ContainImage) Args

func (ContainImage) Args() []core.ArgDef

Args returns the argument definitions.

func (ContainImage) Meta

func (ContainImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (ContainImage) Run

func (ContainImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run contains the image.

type ConvertCoordinateFormat

type ConvertCoordinateFormat struct{}

ConvertCoordinateFormat converts geographic coordinates between formats.

func (ConvertCoordinateFormat) Args

Args returns the argument definitions.

func (ConvertCoordinateFormat) Meta

Meta returns the operation metadata.

func (ConvertCoordinateFormat) Run

func (ConvertCoordinateFormat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the coordinates.

type ConvertImageFormat

type ConvertImageFormat struct{}

ConvertImageFormat re-encodes an image to a different format. Ported from CyberChef's Convert Image Format.

Reduced fidelity, by design: for lossless targets (PNG/BMP/TIFF) the pixels are identical to CyberChef but the encoded bytes differ (different encoders), and the PNG filter-type/deflate-level options do not affect the pixels (Go's PNG encoder doesn't expose the filter type; the deflate level only changes compression). JPEG output is lossy and re-encoded with Go's encoder, so it is an approximation.

func (ConvertImageFormat) Args

func (ConvertImageFormat) Args() []core.ArgDef

Args returns the argument definitions.

func (ConvertImageFormat) Meta

Meta returns the operation metadata.

func (ConvertImageFormat) Run

func (ConvertImageFormat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the image to the requested format.

type ConvertLeetSpeak

type ConvertLeetSpeak struct{}

ConvertLeetSpeak converts text to and from leet speak.

func (ConvertLeetSpeak) Args

func (ConvertLeetSpeak) Args() []core.ArgDef

Args returns the direction.

func (ConvertLeetSpeak) Meta

func (ConvertLeetSpeak) Meta() core.OpMeta

Meta returns the operation metadata.

func (ConvertLeetSpeak) Run

func (ConvertLeetSpeak) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the input. Upstream's tables map every letter, but only six pairs differ from identity: a/e/i/o/s/t against 4/3/1/0/5/7. Going to leet either case of the letter becomes the digit; coming back the digit becomes the lowercase letter (leet digits carry no case to restore), and everything else — other digits, punctuation, anything beyond ASCII — passes through.

type ConvertToNATOAlphabet

type ConvertToNATOAlphabet struct{}

ConvertToNATOAlphabet spells characters out in the NATO phonetic alphabet.

func (ConvertToNATOAlphabet) Args

Args returns no arguments; the operation takes none.

func (ConvertToNATOAlphabet) Meta

Meta returns the operation metadata.

func (ConvertToNATOAlphabet) Run

func (ConvertToNATOAlphabet) Run(in *core.Dish, args []any) (*core.Dish, error)

Run spells the input out. Characters outside the table pass through, so spacing between words follows the input's own.

type CountOccurrences

type CountOccurrences struct{}

CountOccurrences counts how many times a search term appears.

func (CountOccurrences) Args

func (CountOccurrences) Args() []core.ArgDef

Args returns the argument definitions.

func (CountOccurrences) Meta

func (CountOccurrences) Meta() core.OpMeta

Meta returns the operation metadata.

func (CountOccurrences) Run

func (CountOccurrences) Run(in *core.Dish, args []any) (*core.Dish, error)

Run counts occurrences.

type CoverImage

type CoverImage struct{}

CoverImage scales an image to fill a box and crops the overflow.

func (CoverImage) Args

func (CoverImage) Args() []core.ArgDef

Args returns the argument definitions.

func (CoverImage) Meta

func (CoverImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (CoverImage) Run

func (CoverImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run covers the image.

type CropImage

type CropImage struct{}

CropImage crops an image to a region, or auto-crops a uniform border.

func (CropImage) Args

func (CropImage) Args() []core.ArgDef

Args returns the argument definitions.

func (CropImage) Meta

func (CropImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (CropImage) Run

func (CropImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run crops the image.

type DESDecrypt

type DESDecrypt struct{}

DESDecrypt decrypts DES ciphertext.

func (DESDecrypt) Args

func (DESDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (DESDecrypt) Meta

func (DESDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (DESDecrypt) Run

func (DESDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type DESEncrypt

type DESEncrypt struct{}

DESEncrypt encrypts input with the DES block cipher.

func (DESEncrypt) Args

func (DESEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (DESEncrypt) Meta

func (DESEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (DESEncrypt) Run

func (DESEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type DNSOverHTTPS

type DNSOverHTTPS struct{}

DNSOverHTTPS resolves a domain via a DNS-over-HTTPS resolver.

func (DNSOverHTTPS) Args

func (DNSOverHTTPS) Args() []core.ArgDef

Args returns the argument definitions.

func (DNSOverHTTPS) Meta

func (DNSOverHTTPS) Meta() core.OpMeta

Meta returns the operation metadata.

func (DNSOverHTTPS) Run

func (DNSOverHTTPS) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the DNS-over-HTTPS lookup.

type DateTimeDelta

type DateTimeDelta struct{}

DateTimeDelta adds or subtracts a time delta from a datetime string.

func (DateTimeDelta) Args

func (DateTimeDelta) Args() []core.ArgDef

Args returns the argument definitions.

func (DateTimeDelta) Meta

func (DateTimeDelta) Meta() core.OpMeta

Meta returns the operation metadata.

func (DateTimeDelta) Run

func (DateTimeDelta) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the delta.

type DechunkHTTPResponse

type DechunkHTTPResponse struct{}

DechunkHTTPResponse reassembles a chunked transfer-encoding HTTP body.

func (DechunkHTTPResponse) Args

func (DechunkHTTPResponse) Args() []core.ArgDef

Args returns the argument definitions.

func (DechunkHTTPResponse) Meta

Meta returns the operation metadata.

func (DechunkHTTPResponse) Run

func (DechunkHTTPResponse) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reassembles the body.

type DecodeNetBIOSName

type DecodeNetBIOSName struct{}

DecodeNetBIOSName decodes a NetBIOS name (level-1 encoding).

func (DecodeNetBIOSName) Args

func (DecodeNetBIOSName) Args() []core.ArgDef

Args returns the argument definitions.

func (DecodeNetBIOSName) Meta

func (DecodeNetBIOSName) Meta() core.OpMeta

Meta returns the operation metadata.

func (DecodeNetBIOSName) Run

func (DecodeNetBIOSName) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the name.

type DecodeText

type DecodeText struct{}

DecodeText decodes bytes from a chosen character encoding into text.

func (DecodeText) Args

func (DecodeText) Args() []core.ArgDef

Args returns the argument definitions.

func (DecodeText) Meta

func (DecodeText) Meta() core.OpMeta

Meta returns the operation metadata.

func (DecodeText) Run

func (DecodeText) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input bytes using the chosen encoding.

type DefangIPAddresses

type DefangIPAddresses struct{}

DefangIPAddresses makes IP addresses safe by wrapping their separators.

func (DefangIPAddresses) Args

func (DefangIPAddresses) Args() []core.ArgDef

Args returns the argument definitions.

func (DefangIPAddresses) Meta

func (DefangIPAddresses) Meta() core.OpMeta

Meta returns the operation metadata.

func (DefangIPAddresses) Run

func (DefangIPAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run defangs IP addresses.

type DefangURL

type DefangURL struct{}

DefangURL makes URLs safe to share by neutralising them.

func (DefangURL) Args

func (DefangURL) Args() []core.ArgDef

Args returns the argument definitions.

func (DefangURL) Meta

func (DefangURL) Meta() core.OpMeta

Meta returns the operation metadata.

func (DefangURL) Run

func (DefangURL) Run(in *core.Dish, args []any) (*core.Dish, error)

Run defangs the URL.

type DeriveEVPKey

type DeriveEVPKey struct{}

DeriveEVPKey performs the OpenSSL EVP_BytesToKey password-based key derivation function (as implemented by crypto-js's EvpKDF).

func (DeriveEVPKey) Args

func (DeriveEVPKey) Args() []core.ArgDef

Args returns the argument definitions.

func (DeriveEVPKey) Meta

func (DeriveEVPKey) Meta() core.OpMeta

Meta returns the operation metadata.

func (DeriveEVPKey) Run

func (DeriveEVPKey) Run(in *core.Dish, args []any) (*core.Dish, error)

Run derives the key. Note the salt is the parsed argument value (empty → no salt); despite the description, this operation does not generate a random salt.

type DeriveHKDFKey

type DeriveHKDFKey struct{}

DeriveHKDFKey derives a key with the HMAC-based KDF from RFC 5869.

func (DeriveHKDFKey) Args

func (DeriveHKDFKey) Args() []core.ArgDef

Args returns the argument definitions.

func (DeriveHKDFKey) Meta

func (DeriveHKDFKey) Meta() core.OpMeta

Meta returns the operation metadata.

func (DeriveHKDFKey) Run

func (DeriveHKDFKey) Run(in *core.Dish, args []any) (*core.Dish, error)

Run derives the key.

type DerivePBKDF2Key

type DerivePBKDF2Key struct{}

DerivePBKDF2Key performs the PBKDF2 password-based key derivation function (PKCS #5 v2.0 / RFC 2898).

func (DerivePBKDF2Key) Args

func (DerivePBKDF2Key) Args() []core.ArgDef

Args returns the argument definitions.

func (DerivePBKDF2Key) Meta

func (DerivePBKDF2Key) Meta() core.OpMeta

Meta returns the operation metadata.

func (DerivePBKDF2Key) Run

func (DerivePBKDF2Key) Run(_ *core.Dish, args []any) (*core.Dish, error)

Run derives the key. Ported from CyberChef DerivePBKDF2Key.mjs (a wrapper over forge.pkcs5.pbkdf2). The operation ignores its input — the passphrase is the first argument.

forge in the browser uses pure-JS PBKDF2, which truncates the derived-key length toward zero: a key size that is not a multiple of 8 floors to keySizeBits/8 bytes (Go integer division floors identically), and a key size of zero or below yields an empty key.

type DetectFileType

type DetectFileType struct{}

DetectFileType guesses the MIME type of the input from its magic bytes.

func (DetectFileType) Args

func (DetectFileType) Args() []core.ArgDef

Args returns one boolean per signature category (all enabled by default).

func (DetectFileType) Meta

func (DetectFileType) Meta() core.OpMeta

Meta returns the operation metadata.

func (DetectFileType) Run

func (DetectFileType) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports the detected file types.

type Diff

type Diff struct{}

Diff compares two samples and highlights the differences.

func (Diff) Args

func (Diff) Args() []core.ArgDef

Args returns the argument definitions.

func (Diff) Meta

func (Diff) Meta() core.OpMeta

Meta returns the operation metadata.

func (Diff) Run

func (Diff) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the diff.

type DisassembleARM

type DisassembleARM struct{}

DisassembleARM translates ARM machine code into assembly language. CyberChef runs Capstone compiled to WebAssembly; cchef decodes with golang.org/x/arch, which is pure Go, and formats the result to Capstone's conventions so the output matches.

func (DisassembleARM) Args

func (DisassembleARM) Args() []core.ArgDef

Args returns the argument definitions.

func (DisassembleARM) Meta

func (DisassembleARM) Meta() core.OpMeta

Meta returns the operation metadata.

func (DisassembleARM) Run

func (DisassembleARM) Run(in *core.Dish, args []any) (*core.Dish, error)

Run disassembles the hexadecimal input.

type DisassembleX86

type DisassembleX86 struct{}

DisassembleX86 translates x86 machine code into assembly language. Ported from CyberChef, which wraps Damian Recoskie's X86-64-Disassembler-JS (src/core/vendor/DisassembleX86-64.mjs, MIT). The port reproduces that engine rather than wrapping a Go disassembler so the output matches CyberChef exactly, down to its quirks: it predates ENDBR64, resolves RIP-relative operands to absolute addresses, and prints NaN where an instruction runs off the end of the input. Its opcode tables are vendored in x86tables/.

func (DisassembleX86) Args

func (DisassembleX86) Args() []core.ArgDef

Args returns the argument definitions.

func (DisassembleX86) Meta

func (DisassembleX86) Meta() core.OpMeta

Meta returns the operation metadata.

func (DisassembleX86) Run

func (DisassembleX86) Run(in *core.Dish, args []any) (*core.Dish, error)

Run disassembles the hexadecimal input.

type DitherImage

type DitherImage struct{}

DitherImage applies an ordered dither effect.

func (DitherImage) Args

func (DitherImage) Args() []core.ArgDef

Args returns the argument definitions.

func (DitherImage) Meta

func (DitherImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (DitherImage) Run

func (DitherImage) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run dithers the image.

type Divide

type Divide struct{}

Divide divides a list of numbers.

func (Divide) Args

func (Divide) Args() []core.ArgDef

Args returns the argument definitions.

func (Divide) Meta

func (Divide) Meta() core.OpMeta

Meta returns the operation metadata.

func (Divide) Run

func (Divide) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type DropBytes

type DropBytes struct{}

DropBytes removes a range of bytes from the input.

func (DropBytes) Args

func (DropBytes) Args() []core.ArgDef

Args returns the argument definitions.

func (DropBytes) Meta

func (DropBytes) Meta() core.OpMeta

Meta returns the operation metadata.

func (DropBytes) Run

func (DropBytes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run drops the byte range.

type DropNthBytes

type DropNthBytes struct{}

DropNthBytes drops every nth byte.

func (DropNthBytes) Args

func (DropNthBytes) Args() []core.ArgDef

Args returns the argument definitions.

func (DropNthBytes) Meta

func (DropNthBytes) Meta() core.OpMeta

Meta returns the operation metadata.

func (DropNthBytes) Run

func (DropNthBytes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run drops every nth byte.

type ECDSASign

type ECDSASign struct{}

ECDSASign signs a message with a PEM EC private key.

func (ECDSASign) Args

func (ECDSASign) Args() []core.ArgDef

Args returns the argument definitions.

func (ECDSASign) Meta

func (ECDSASign) Meta() core.OpMeta

Meta returns the operation metadata.

func (ECDSASign) Run

func (ECDSASign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run signs the input.

type ECDSASignatureConversion

type ECDSASignatureConversion struct{}

ECDSASignatureConversion converts a signature between formats.

func (ECDSASignatureConversion) Args

Args returns the argument definitions.

func (ECDSASignatureConversion) Meta

Meta returns the operation metadata.

func (ECDSASignatureConversion) Run

func (ECDSASignatureConversion) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the signature.

type ECDSAVerify

type ECDSAVerify struct{}

ECDSAVerify verifies a signature against a message and a PEM EC public key.

func (ECDSAVerify) Args

func (ECDSAVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (ECDSAVerify) Meta

func (ECDSAVerify) Meta() core.OpMeta

Meta returns the operation metadata.

func (ECDSAVerify) Run

func (ECDSAVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run verifies the signature.

type ELFInfo

type ELFInfo struct{}

ELFInfo reports the header, program headers, section headers and symbol table of an ELF file.

func (ELFInfo) Args

func (ELFInfo) Args() []core.ArgDef

Args returns no arguments; the operation takes none.

func (ELFInfo) Meta

func (ELFInfo) Meta() core.OpMeta

Meta returns the operation metadata.

func (ELFInfo) Run

func (ELFInfo) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports what the ELF file describes.

type EncodeNetBIOSName

type EncodeNetBIOSName struct{}

EncodeNetBIOSName encodes a NetBIOS name (level-1 encoding).

func (EncodeNetBIOSName) Args

func (EncodeNetBIOSName) Args() []core.ArgDef

Args returns the argument definitions.

func (EncodeNetBIOSName) Meta

func (EncodeNetBIOSName) Meta() core.OpMeta

Meta returns the operation metadata.

func (EncodeNetBIOSName) Run

func (EncodeNetBIOSName) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the name.

type EncodeText

type EncodeText struct{}

EncodeText encodes text into a chosen character encoding.

func (EncodeText) Args

func (EncodeText) Args() []core.ArgDef

Args returns the argument definitions.

func (EncodeText) Meta

func (EncodeText) Meta() core.OpMeta

Meta returns the operation metadata.

func (EncodeText) Run

func (EncodeText) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input text using the chosen encoding.

type Enigma

type Enigma struct{}

Enigma emulates the WW2 Enigma machine.

func (Enigma) Args

func (Enigma) Args() []core.ArgDef

Args returns the argument definitions.

func (Enigma) Meta

func (Enigma) Meta() core.OpMeta

Meta returns the operation metadata.

func (Enigma) Run

func (Enigma) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption/decryption.

type Entropy

type Entropy struct{}

Entropy measures how evenly the bytes of the input are spread.

func (Entropy) Args

func (Entropy) Args() []core.ArgDef

Args returns the argument definitions.

func (Entropy) Meta

func (Entropy) Meta() core.OpMeta

Meta returns the operation metadata.

func (Entropy) Run

func (Entropy) Run(in *core.Dish, args []any) (*core.Dish, error)

Run measures the entropy. Each visualisation measures something different: the scale reads the whole input at once, the histograms count byte values, and the curve and image walk the input in blocks.

type EscapeSmartCharacters

type EscapeSmartCharacters struct{}

EscapeSmartCharacters converts typographic Unicode characters to their plain ASCII equivalents.

func (EscapeSmartCharacters) Args

Args returns the argument definitions.

func (EscapeSmartCharacters) Meta

Meta returns the operation metadata.

func (EscapeSmartCharacters) Run

func (EscapeSmartCharacters) Run(in *core.Dish, args []any) (*core.Dish, error)

Run escapes the smart characters.

type EscapeString

type EscapeString struct{}

EscapeString escapes special characters in a string. This is an in-repo implementation of the behaviour CyberChef gets from the jsesc library; it covers the documented options but is not guaranteed byte-identical to jsesc in every edge case.

func (EscapeString) Args

func (EscapeString) Args() []core.ArgDef

Args returns the argument definitions.

func (EscapeString) Meta

func (EscapeString) Meta() core.OpMeta

Meta returns the operation metadata.

func (EscapeString) Run

func (EscapeString) Run(in *core.Dish, args []any) (*core.Dish, error)

Run escapes the input.

type EscapeUnicodeCharacters

type EscapeUnicodeCharacters struct{}

EscapeUnicodeCharacters converts characters to unicode-escaped notation.

func (EscapeUnicodeCharacters) Args

Args returns the argument definitions.

func (EscapeUnicodeCharacters) Meta

Meta returns the operation metadata.

func (EscapeUnicodeCharacters) Run

func (EscapeUnicodeCharacters) Run(in *core.Dish, args []any) (*core.Dish, error)

Run escapes the input.

type ExpandAlphabetRange

type ExpandAlphabetRange struct{}

ExpandAlphabetRange expands an alphabet range specification.

func (ExpandAlphabetRange) Args

func (ExpandAlphabetRange) Args() []core.ArgDef

Args returns the argument definitions.

func (ExpandAlphabetRange) Meta

Meta returns the operation metadata.

func (ExpandAlphabetRange) Run

func (ExpandAlphabetRange) Run(in *core.Dish, args []any) (*core.Dish, error)

Run expands the range.

type ExtendedGCD

type ExtendedGCD struct{}

ExtendedGCD finds the greatest common divisor of two numbers along with the coefficients that express it.

func (ExtendedGCD) Args

func (ExtendedGCD) Args() []core.ArgDef

Args returns the two values, either of which may be left blank to take it from the input instead.

func (ExtendedGCD) Meta

func (ExtendedGCD) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtendedGCD) Run

func (ExtendedGCD) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports the divisor and the coefficients.

type ExtractAudioMetadata

type ExtractAudioMetadata struct{}

ExtractAudioMetadata reads the metadata out of an audio file.

func (ExtractAudioMetadata) Args

func (ExtractAudioMetadata) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractAudioMetadata) Meta

Meta returns the operation metadata.

func (ExtractAudioMetadata) Run

func (ExtractAudioMetadata) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reads the file.

type ExtractDates

type ExtractDates struct{}

ExtractDates extracts dates in yyyy-mm-dd, dd/mm/yyyy and mm/dd/yyyy shapes.

func (ExtractDates) Args

func (ExtractDates) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractDates) Meta

func (ExtractDates) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractDates) Run

func (ExtractDates) Run(in *core.Dish, args []any) (*core.Dish, error)

Run extracts the dates.

type ExtractDomains

type ExtractDomains struct{}

ExtractDomains pulls the fully qualified domain names out of the input.

func (ExtractDomains) Args

func (ExtractDomains) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractDomains) Meta

func (ExtractDomains) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractDomains) Run

func (ExtractDomains) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the domain names.

type ExtractEXIF

type ExtractEXIF struct{}

ExtractEXIF extracts EXIF metadata from an image.

func (ExtractEXIF) Args

func (ExtractEXIF) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractEXIF) Meta

func (ExtractEXIF) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractEXIF) Run

func (ExtractEXIF) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run extracts and formats the EXIF tags.

type ExtractEmailAddresses

type ExtractEmailAddresses struct{}

ExtractEmailAddresses pulls the email addresses out of the input.

func (ExtractEmailAddresses) Args

Args returns the argument definitions.

func (ExtractEmailAddresses) Meta

Meta returns the operation metadata.

func (ExtractEmailAddresses) Run

func (ExtractEmailAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the addresses.

type ExtractFilePaths

type ExtractFilePaths struct{}

ExtractFilePaths pulls anything shaped like a file path out of the input.

func (ExtractFilePaths) Args

func (ExtractFilePaths) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractFilePaths) Meta

func (ExtractFilePaths) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractFilePaths) Run

func (ExtractFilePaths) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the paths. With neither shape asked for the result is empty, and the total is not shown either.

type ExtractFiles

type ExtractFiles struct{}

ExtractFiles carves embedded files out of a buffer.

func (ExtractFiles) Args

func (ExtractFiles) Args() []core.ArgDef

Args returns the argument definitions: one switch per signature category, then whether to keep quiet about carves that fail and the size floor.

func (ExtractFiles) Meta

func (ExtractFiles) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractFiles) Run

func (ExtractFiles) Run(in *core.Dish, args []any) (*core.Dish, error)

Run carves out every file it can find.

type ExtractHashes

type ExtractHashes struct{}

ExtractHashes pulls runs of hexadecimal the length of a hash out of the input.

func (ExtractHashes) Args

func (ExtractHashes) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractHashes) Meta

func (ExtractHashes) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractHashes) Run

func (ExtractHashes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the runs of hexadecimal.

type ExtractID3

type ExtractID3 struct{}

ExtractID3 reads the ID3 metadata out of an MP3 file.

func (ExtractID3) Args

func (ExtractID3) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractID3) Meta

func (ExtractID3) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractID3) Run

func (ExtractID3) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run reads the tag.

type ExtractIPAddresses

type ExtractIPAddresses struct{}

ExtractIPAddresses pulls the IP addresses out of the input.

func (ExtractIPAddresses) Args

func (ExtractIPAddresses) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractIPAddresses) Meta

Meta returns the operation metadata.

func (ExtractIPAddresses) Run

func (ExtractIPAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the addresses.

type ExtractLSB

type ExtractLSB struct{}

ExtractLSB reads a chosen bit of chosen channels from every pixel of an image.

func (ExtractLSB) Args

func (ExtractLSB) Args() []core.ArgDef

Args returns four colour patterns (the last three may be empty), the pixel order, and which bit to read.

func (ExtractLSB) Meta

func (ExtractLSB) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractLSB) Run

func (ExtractLSB) Run(in *core.Dish, args []any) (*core.Dish, error)

Run extracts the chosen bits.

type ExtractMACAddresses

type ExtractMACAddresses struct{}

ExtractMACAddresses pulls the MAC addresses out of the input.

func (ExtractMACAddresses) Args

func (ExtractMACAddresses) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractMACAddresses) Meta

Meta returns the operation metadata.

func (ExtractMACAddresses) Run

func (ExtractMACAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the addresses.

type ExtractRGBA

type ExtractRGBA struct{}

ExtractRGBA lists every pixel's channel values.

func (ExtractRGBA) Args

func (ExtractRGBA) Args() []core.ArgDef

Args returns the delimiter (any string, comma by default) and whether the alpha channel is included.

func (ExtractRGBA) Meta

func (ExtractRGBA) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractRGBA) Run

func (ExtractRGBA) Run(in *core.Dish, args []any) (*core.Dish, error)

Run lists the channel values.

type ExtractURLs

type ExtractURLs struct{}

ExtractURLs pulls the URLs out of the input.

func (ExtractURLs) Args

func (ExtractURLs) Args() []core.ArgDef

Args returns the argument definitions.

func (ExtractURLs) Meta

func (ExtractURLs) Meta() core.OpMeta

Meta returns the operation metadata.

func (ExtractURLs) Run

func (ExtractURLs) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the URLs.

type FangURL

type FangURL struct{}

FangURL reverses Defang URL, restoring a usable URL.

func (FangURL) Args

func (FangURL) Args() []core.ArgDef

Args returns the argument definitions.

func (FangURL) Meta

func (FangURL) Meta() core.OpMeta

Meta returns the operation metadata.

func (FangURL) Run

func (FangURL) Run(in *core.Dish, args []any) (*core.Dish, error)

Run fangs the URL.

type FernetDecrypt

type FernetDecrypt struct{}

FernetDecrypt decrypts a Fernet token.

func (FernetDecrypt) Args

func (FernetDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (FernetDecrypt) Meta

func (FernetDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (FernetDecrypt) Run

func (FernetDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts the token.

type FernetEncrypt

type FernetEncrypt struct{}

FernetEncrypt encrypts input into a Fernet token.

func (FernetEncrypt) Args

func (FernetEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (FernetEncrypt) Meta

func (FernetEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (FernetEncrypt) Run

func (FernetEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts the input. A fresh random IV and the current time are used.

type FileTree

type FileTree struct{}

FileTree renders a list of file paths as a tree.

func (FileTree) Args

func (FileTree) Args() []core.ArgDef

Args returns the argument definitions.

func (FileTree) Meta

func (FileTree) Meta() core.OpMeta

Meta returns the operation metadata.

func (FileTree) Run

func (FileTree) Run(in *core.Dish, args []any) (*core.Dish, error)

Run builds the tree.

type Filter

type Filter struct{}

Filter keeps only the sections matching (or not matching) a regex.

func (Filter) Args

func (Filter) Args() []core.ArgDef

Args returns the argument definitions.

func (Filter) Meta

func (Filter) Meta() core.OpMeta

Meta returns the operation metadata.

func (Filter) Run

func (Filter) Run(in *core.Dish, args []any) (*core.Dish, error)

Run filters the sections.

type FindReplace

type FindReplace struct{}

FindReplace replaces matches of a pattern with a replacement string.

func (FindReplace) Args

func (FindReplace) Args() []core.ArgDef

Args returns the argument definitions.

func (FindReplace) Meta

func (FindReplace) Meta() core.OpMeta

Meta returns the operation metadata.

func (FindReplace) Run

func (FindReplace) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the replacement.

type FlaskSessionDecode

type FlaskSessionDecode struct{}

FlaskSessionDecode decodes a Flask session cookie payload into JSON.

func (FlaskSessionDecode) Args

func (FlaskSessionDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (FlaskSessionDecode) Meta

Meta returns the operation metadata.

func (FlaskSessionDecode) Run

func (FlaskSessionDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the token.

type FlaskSessionSign

type FlaskSessionSign struct{}

FlaskSessionSign signs a JSON payload into a Flask session cookie.

func (FlaskSessionSign) Args

func (FlaskSessionSign) Args() []core.ArgDef

Args returns the argument definitions.

func (FlaskSessionSign) Meta

func (FlaskSessionSign) Meta() core.OpMeta

Meta returns the operation metadata.

func (FlaskSessionSign) Run

func (FlaskSessionSign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run signs the payload.

type FlaskSessionVerify

type FlaskSessionVerify struct{}

FlaskSessionVerify verifies a Flask session cookie's HMAC signature.

func (FlaskSessionVerify) Args

func (FlaskSessionVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (FlaskSessionVerify) Meta

Meta returns the operation metadata.

func (FlaskSessionVerify) Run

func (FlaskSessionVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run verifies the token.

type Fletcher8Checksum

type Fletcher8Checksum struct{}

Fletcher8Checksum computes the 8-bit Fletcher checksum (two 4-bit sums mod 15).

func (Fletcher8Checksum) Args

func (Fletcher8Checksum) Args() []core.ArgDef

Args returns the argument definitions.

func (Fletcher8Checksum) Meta

func (Fletcher8Checksum) Meta() core.OpMeta

Meta returns the operation metadata.

func (Fletcher8Checksum) Run

func (Fletcher8Checksum) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run computes the checksum.

type Fletcher16Checksum

type Fletcher16Checksum struct{}

Fletcher16Checksum computes the 16-bit Fletcher checksum (two 8-bit sums mod 255).

func (Fletcher16Checksum) Args

func (Fletcher16Checksum) Args() []core.ArgDef

Args returns the argument definitions.

func (Fletcher16Checksum) Meta

Meta returns the operation metadata.

func (Fletcher16Checksum) Run

func (Fletcher16Checksum) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run computes the checksum.

type Fletcher32Checksum

type Fletcher32Checksum struct{}

Fletcher32Checksum computes the 32-bit Fletcher checksum over 16-bit little-endian words (two 16-bit sums mod 65535).

func (Fletcher32Checksum) Args

func (Fletcher32Checksum) Args() []core.ArgDef

Args returns the argument definitions.

func (Fletcher32Checksum) Meta

Meta returns the operation metadata.

func (Fletcher32Checksum) Run

func (Fletcher32Checksum) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run computes the checksum.

type Fletcher64Checksum

type Fletcher64Checksum struct{}

Fletcher64Checksum computes the 64-bit Fletcher checksum over 32-bit little-endian words (two 32-bit sums mod 2^32 − 1).

func (Fletcher64Checksum) Args

func (Fletcher64Checksum) Args() []core.ArgDef

Args returns the argument definitions.

func (Fletcher64Checksum) Meta

Meta returns the operation metadata.

func (Fletcher64Checksum) Run

func (Fletcher64Checksum) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run computes the checksum.

type FlipImage

type FlipImage struct{}

FlipImage flips an image along its X or Y axis. Ported from CyberChef's Flip Image (Jimp's flip): each pixel is moved to the mirrored position.

func (FlipImage) Args

func (FlipImage) Args() []core.ArgDef

Args returns the argument definitions.

func (FlipImage) Meta

func (FlipImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (FlipImage) Run

func (FlipImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run flips the image.

type Fork

type Fork struct{}

Fork splits the data and runs the rest of the recipe over each piece.

func (Fork) Args

func (Fork) Args() []core.ArgDef

Args returns the delimiters and whether a failing branch stops the recipe.

func (Fork) Meta

func (Fork) Meta() core.OpMeta

Meta returns the operation metadata.

func (Fork) Run

func (Fork) Run(in *core.Dish, args []any) (*core.Dish, error)

Run splits and rejoins the data; outside a recipe there are no steps to run over the pieces, so this replaces the split delimiter with the merge one.

func (Fork) RunFlow

func (Fork) RunFlow(state *core.FlowState) error

RunFlow runs the steps below over each piece and rejoins the results.

type FormatMACAddresses

type FormatMACAddresses struct{}

FormatMACAddresses reformats MAC addresses into a variety of styles.

func (FormatMACAddresses) Args

func (FormatMACAddresses) Args() []core.ArgDef

Args returns the argument definitions.

func (FormatMACAddresses) Meta

Meta returns the operation metadata.

func (FormatMACAddresses) Run

func (FormatMACAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reformats the addresses.

type FrequencyDistribution

type FrequencyDistribution struct{}

FrequencyDistribution reports how often each byte value occurs.

func (FrequencyDistribution) Args

Args returns the argument definitions.

func (FrequencyDistribution) Meta

Meta returns the operation metadata.

func (FrequencyDistribution) Run

func (FrequencyDistribution) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports the distribution. CyberChef draws a bar chart into a canvas alongside the table, which needs a browser to size and render; the table and the counts above it carry the same figures.

type FromBCD

type FromBCD struct{}

FromBCD decodes a Binary-Coded Decimal value into a decimal number.

func (FromBCD) Args

func (FromBCD) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBCD) Meta

func (FromBCD) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBCD) Run

func (FromBCD) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase

type FromBase struct{}

FromBase converts a string in the given radix to a decimal integer.

func (FromBase) Args

func (FromBase) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase) Meta

func (FromBase) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase) Run

func (FromBase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the input from the given radix to decimal.

type FromBase32

type FromBase32 struct{}

FromBase32 decodes a Base32 string back into raw bytes.

func (FromBase32) Args

func (FromBase32) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase32) Meta

func (FromBase32) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase32) Run

func (FromBase32) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase45

type FromBase45 struct{}

FromBase45 decodes a Base45 string back into raw bytes.

func (FromBase45) Args

func (FromBase45) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase45) Meta

func (FromBase45) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase45) Run

func (FromBase45) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase58

type FromBase58 struct{}

FromBase58 decodes a Base58 string back into raw bytes.

func (FromBase58) Args

func (FromBase58) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase58) Meta

func (FromBase58) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase58) Run

func (FromBase58) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase62

type FromBase62 struct{}

FromBase62 decodes a Base62 string back into raw bytes.

func (FromBase62) Args

func (FromBase62) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase62) Meta

func (FromBase62) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase62) Run

func (FromBase62) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase64

type FromBase64 struct{}

FromBase64 decodes data from an ASCII Base64 string back into raw bytes.

func (FromBase64) Args

func (FromBase64) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase64) Meta

func (FromBase64) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase64) Run

func (FromBase64) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase85

type FromBase85 struct{}

FromBase85 decodes a Base85 (Ascii85) string back into raw bytes.

func (FromBase85) Args

func (FromBase85) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase85) Meta

func (FromBase85) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase85) Run

func (FromBase85) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBase92

type FromBase92 struct{}

FromBase92 decodes a Base92 string back into raw bytes.

func (FromBase92) Args

func (FromBase92) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBase92) Meta

func (FromBase92) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBase92) Run

func (FromBase92) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBech32

type FromBech32 struct{}

FromBech32 decodes a Bech32/Bech32m string.

func (FromBech32) Args

func (FromBech32) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBech32) Meta

func (FromBech32) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBech32) Run

func (FromBech32) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input from Bech32/Bech32m.

type FromBinary

type FromBinary struct{}

FromBinary converts a binary string back into its raw byte value.

func (FromBinary) Args

func (FromBinary) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBinary) Meta

func (FromBinary) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBinary) Run

func (FromBinary) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromBraille

type FromBraille struct{}

FromBraille converts six-dot braille symbols to text.

func (FromBraille) Args

func (FromBraille) Args() []core.ArgDef

Args returns the argument definitions.

func (FromBraille) Meta

func (FromBraille) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromBraille) Run

func (FromBraille) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts braille to text.

type FromCOBS

type FromCOBS struct{}

FromCOBS puts back the zero bytes COBS removed.

func (FromCOBS) Args

func (FromCOBS) Args() []core.ArgDef

Args returns no arguments; the operation takes none.

func (FromCOBS) Meta

func (FromCOBS) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromCOBS) Run

func (FromCOBS) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromCaseInsensitiveRegex

type FromCaseInsensitiveRegex struct{}

FromCaseInsensitiveRegex collapses [lL] pairs back to a single letter.

func (FromCaseInsensitiveRegex) Args

Args returns the argument definitions.

func (FromCaseInsensitiveRegex) Meta

Meta returns the operation metadata.

func (FromCaseInsensitiveRegex) Run

func (FromCaseInsensitiveRegex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run collapses the pairs.

type FromCharcode

type FromCharcode struct{}

FromCharcode converts numeric character codes back into text.

func (FromCharcode) Args

func (FromCharcode) Args() []core.ArgDef

Args returns the argument definitions.

func (FromCharcode) Meta

func (FromCharcode) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromCharcode) Run

func (FromCharcode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromDecimal

type FromDecimal struct{}

FromDecimal converts a delimited list of decimal values back into bytes.

func (FromDecimal) Args

func (FromDecimal) Args() []core.ArgDef

Args returns the argument definitions.

func (FromDecimal) Meta

func (FromDecimal) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromDecimal) Run

func (FromDecimal) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromFloat

type FromFloat struct{}

FromFloat converts decimal numbers into their IEEE754 byte representation.

func (FromFloat) Args

func (FromFloat) Args() []core.ArgDef

Args returns the argument definitions.

func (FromFloat) Meta

func (FromFloat) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromFloat) Run

func (FromFloat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type FromHTMLEntity

type FromHTMLEntity struct{}

FromHTMLEntity converts HTML entities back into raw characters.

func (FromHTMLEntity) Args

func (FromHTMLEntity) Args() []core.ArgDef

Args returns the argument definitions.

func (FromHTMLEntity) Meta

func (FromHTMLEntity) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromHTMLEntity) Run

func (FromHTMLEntity) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input. Named entities resolve via the table, then numeric (&#d;) and hex (&#xH;) forms; anything else is left verbatim.

type FromHex

type FromHex struct{}

FromHex converts a hexadecimal byte string back to its raw value.

func (FromHex) Args

func (FromHex) Args() []core.ArgDef

Args returns the argument definitions.

func (FromHex) Meta

func (FromHex) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromHex) Run

func (FromHex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromHexContent

type FromHexContent struct{}

FromHexContent translates SNORT hex-content notation back to raw bytes (e.g. foo|3d|bar -> foo=bar).

func (FromHexContent) Args

func (FromHexContent) Args() []core.ArgDef

Args returns the argument definitions.

func (FromHexContent) Meta

func (FromHexContent) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromHexContent) Run

func (FromHexContent) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input. Ported from CyberChef FromHexContent.mjs: each "|<hex>|" block is decoded and everything else is passed through as raw bytes.

type FromHexdump

type FromHexdump struct{}

FromHexdump attempts to convert a hexdump back into raw data.

func (FromHexdump) Args

func (FromHexdump) Args() []core.ArgDef

Args returns the argument definitions.

func (FromHexdump) Meta

func (FromHexdump) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromHexdump) Run

func (FromHexdump) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the hexdump. The upstream width/CR detection only toggles UI highlighting, so it is omitted here.

type FromMessagePack

type FromMessagePack struct{}

FromMessagePack deserialises MessagePack into JSON.

CyberChef wraps the `notepack.io` library's decode; this reproduces its value model: byte strings render as Node Buffers, map keys are String()-coerced, integers beyond 2^53 lose precision to floats, undefined markers are omitted from objects, ext types render as [type, Buffer] and timestamp extensions become ISO date strings.

func (FromMessagePack) Args

func (FromMessagePack) Args() []core.ArgDef

Args returns the argument definitions.

func (FromMessagePack) Meta

func (FromMessagePack) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromMessagePack) Run

func (FromMessagePack) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decodes MessagePack bytes into JSON.

type FromModhex

type FromModhex struct{}

FromModhex converts a modhex string back into its raw value.

func (FromModhex) Args

func (FromModhex) Args() []core.ArgDef

Args returns the argument definitions.

func (FromModhex) Meta

func (FromModhex) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromModhex) Run

func (FromModhex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromMorseCode

type FromMorseCode struct{}

FromMorseCode translates Morse Code back into upper-case text.

func (FromMorseCode) Args

func (FromMorseCode) Args() []core.ArgDef

Args returns the argument definitions.

func (FromMorseCode) Meta

func (FromMorseCode) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromMorseCode) Run

func (FromMorseCode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromOctal

type FromOctal struct{}

FromOctal converts an octal byte string back into its raw value.

func (FromOctal) Args

func (FromOctal) Args() []core.ArgDef

Args returns the argument definitions.

func (FromOctal) Meta

func (FromOctal) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromOctal) Run

func (FromOctal) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromPunycode

type FromPunycode struct{}

FromPunycode converts Punycode to Unicode.

CyberChef wraps punycode.js's decode (raw) and toUnicode (IDN); this is a RFC 3492 implementation serving both.

func (FromPunycode) Args

func (FromPunycode) Args() []core.ArgDef

Args returns the argument definitions.

func (FromPunycode) Meta

func (FromPunycode) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromPunycode) Run

func (FromPunycode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the Punycode input to Unicode.

type FromQuotedPrintable

type FromQuotedPrintable struct{}

FromQuotedPrintable decodes a Quoted-Printable string back into raw bytes.

func (FromQuotedPrintable) Args

func (FromQuotedPrintable) Args() []core.ArgDef

Args returns the argument definitions.

func (FromQuotedPrintable) Meta

Meta returns the operation metadata.

func (FromQuotedPrintable) Run

func (FromQuotedPrintable) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type FromUNIXTimestamp

type FromUNIXTimestamp struct{}

FromUNIXTimestamp renders a UNIX timestamp as a human-readable UTC datetime.

func (FromUNIXTimestamp) Args

func (FromUNIXTimestamp) Args() []core.ArgDef

Args returns the argument definitions.

func (FromUNIXTimestamp) Meta

func (FromUNIXTimestamp) Meta() core.OpMeta

Meta returns the operation metadata.

func (FromUNIXTimestamp) Run

func (FromUNIXTimestamp) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the timestamp.

type FuzzyMatch

type FuzzyMatch struct{}

FuzzyMatch performs a fuzzy search for a pattern within the input.

func (FuzzyMatch) Args

func (FuzzyMatch) Args() []core.ArgDef

Args returns the argument definitions.

func (FuzzyMatch) Meta

func (FuzzyMatch) Meta() core.OpMeta

Meta returns the operation metadata.

func (FuzzyMatch) Run

func (FuzzyMatch) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the fuzzy match.

type GOSTDecrypt

type GOSTDecrypt struct{}

GOSTDecrypt decrypts GOST ciphertext (Magma or Kuznyechik).

func (GOSTDecrypt) Args

func (GOSTDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTDecrypt) Meta

func (GOSTDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTDecrypt) Run

func (GOSTDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type GOSTEncrypt

type GOSTEncrypt struct{}

GOSTEncrypt encrypts input with a GOST block cipher (Magma or Kuznyechik).

func (GOSTEncrypt) Args

func (GOSTEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTEncrypt) Meta

func (GOSTEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTEncrypt) Run

func (GOSTEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type GOSTHash

type GOSTHash struct{}

GOSTHash computes a GOST R 34.11 hash (94 or 2012 Streebog).

func (GOSTHash) Args

func (GOSTHash) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTHash) Meta

func (GOSTHash) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTHash) Run

func (GOSTHash) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the digest.

type GOSTKeyUnwrap

type GOSTKeyUnwrap struct{}

GOSTKeyUnwrap decrypts a key wrapped with a GOST cipher.

func (GOSTKeyUnwrap) Args

func (GOSTKeyUnwrap) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTKeyUnwrap) Meta

func (GOSTKeyUnwrap) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTKeyUnwrap) Run

func (GOSTKeyUnwrap) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the key unwrapping.

type GOSTKeyWrap

type GOSTKeyWrap struct{}

GOSTKeyWrap wraps a content-encryption key under a KEK using a GOST cipher.

func (GOSTKeyWrap) Args

func (GOSTKeyWrap) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTKeyWrap) Meta

func (GOSTKeyWrap) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTKeyWrap) Run

func (GOSTKeyWrap) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the key wrapping.

type GOSTSign

type GOSTSign struct{}

GOSTSign signs a message with a GOST block-cipher MAC (imitovstavka).

func (GOSTSign) Args

func (GOSTSign) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTSign) Meta

func (GOSTSign) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTSign) Run

func (GOSTSign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the MAC.

type GOSTVerify

type GOSTVerify struct{}

GOSTVerify verifies a GOST block-cipher MAC against a message.

func (GOSTVerify) Args

func (GOSTVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (GOSTVerify) Meta

func (GOSTVerify) Meta() core.OpMeta

Meta returns the operation metadata.

func (GOSTVerify) Run

func (GOSTVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run verifies the MAC.

type GenerateAllChecksums

type GenerateAllChecksums struct{}

GenerateAllChecksums runs every built-in checksum over the input and lists the results, in CyberChef's GenerateAllChecksums shape: the same ordered set of CRC variants plus the Fletcher and Adler-32 checksums, optionally filtered by bit width and labelled with aligned names.

func (GenerateAllChecksums) Args

func (GenerateAllChecksums) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateAllChecksums) Meta

Meta returns the operation metadata.

func (GenerateAllChecksums) Run

func (GenerateAllChecksums) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the selected checksums.

type GenerateAllHashes

type GenerateAllHashes struct{}

GenerateAllHashes runs every available hash and checksum over the input.

func (GenerateAllHashes) Args

func (GenerateAllHashes) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateAllHashes) Meta

func (GenerateAllHashes) Meta() core.OpMeta

Meta returns the operation metadata.

func (GenerateAllHashes) Run

func (GenerateAllHashes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates all hashes.

type GenerateDeBruijnSequence

type GenerateDeBruijnSequence struct{}

GenerateDeBruijnSequence builds a De Bruijn sequence.

func (GenerateDeBruijnSequence) Args

Args returns the argument definitions.

func (GenerateDeBruijnSequence) Meta

Meta returns the operation metadata.

func (GenerateDeBruijnSequence) Run

func (GenerateDeBruijnSequence) Run(in *core.Dish, args []any) (*core.Dish, error)

Run builds the sequence. The input plays no part.

type GenerateECDSAKeyPair

type GenerateECDSAKeyPair struct{}

GenerateECDSAKeyPair generates an EC key pair.

func (GenerateECDSAKeyPair) Args

func (GenerateECDSAKeyPair) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateECDSAKeyPair) Meta

Meta returns the operation metadata.

func (GenerateECDSAKeyPair) Run

func (GenerateECDSAKeyPair) Run(_ *core.Dish, args []any) (*core.Dish, error)

Run generates the key pair.

type GenerateHOTP

type GenerateHOTP struct{}

GenerateHOTP works out a counter-based one-time password.

func (GenerateHOTP) Args

func (GenerateHOTP) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateHOTP) Meta

func (GenerateHOTP) Meta() core.OpMeta

Meta returns the operation metadata.

func (GenerateHOTP) Run

func (GenerateHOTP) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the password.

type GenerateImage

type GenerateImage struct{}

GenerateImage builds an image whose pixels come from the input bytes.

func (GenerateImage) Args

func (GenerateImage) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateImage) Meta

func (GenerateImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (GenerateImage) Run

func (GenerateImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the image.

type GenerateLoremIpsum

type GenerateLoremIpsum struct{}

GenerateLoremIpsum makes placeholder text.

func (GenerateLoremIpsum) Args

func (GenerateLoremIpsum) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateLoremIpsum) Meta

Meta returns the operation metadata.

func (GenerateLoremIpsum) Run

func (GenerateLoremIpsum) Run(in *core.Dish, args []any) (*core.Dish, error)

Run makes the text.

type GeneratePGPKeyPair

type GeneratePGPKeyPair struct{}

GeneratePGPKeyPair generates a PGP key pair.

func (GeneratePGPKeyPair) Args

func (GeneratePGPKeyPair) Args() []core.ArgDef

Args returns the argument definitions.

func (GeneratePGPKeyPair) Meta

Meta returns the operation metadata.

func (GeneratePGPKeyPair) Run

func (GeneratePGPKeyPair) Run(_ *core.Dish, args []any) (*core.Dish, error)

Run generates the key pair.

type GenerateQRCode

type GenerateQRCode struct{}

GenerateQRCode renders the input as a QR code. Ported from CyberChef's Generate QR Code, which wraps the qr-image package; the vector renderers come from that package's vector.js and are byte-exact.

func (GenerateQRCode) Args

func (GenerateQRCode) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateQRCode) Meta

func (GenerateQRCode) Meta() core.OpMeta

Meta returns the operation metadata.

func (GenerateQRCode) Run

func (GenerateQRCode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the code.

type GenerateRSAKeyPair

type GenerateRSAKeyPair struct{}

GenerateRSAKeyPair generates an RSA key pair.

func (GenerateRSAKeyPair) Args

func (GenerateRSAKeyPair) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateRSAKeyPair) Meta

Meta returns the operation metadata.

func (GenerateRSAKeyPair) Run

func (GenerateRSAKeyPair) Run(_ *core.Dish, args []any) (*core.Dish, error)

Run generates the key pair.

type GenerateTOTP

type GenerateTOTP struct{}

GenerateTOTP works out a time-based one-time password.

func (GenerateTOTP) Args

func (GenerateTOTP) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateTOTP) Meta

func (GenerateTOTP) Meta() core.OpMeta

Meta returns the operation metadata.

func (GenerateTOTP) Run

func (GenerateTOTP) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the password.

type GenerateUUID

type GenerateUUID struct{}

GenerateUUID makes a universally unique identifier.

func (GenerateUUID) Args

func (GenerateUUID) Args() []core.ArgDef

Args returns the argument definitions.

func (GenerateUUID) Meta

func (GenerateUUID) Meta() core.OpMeta

Meta returns the operation metadata.

func (GenerateUUID) Run

func (GenerateUUID) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the UUID.

type GenericCodeBeautify

type GenericCodeBeautify struct{}

GenericCodeBeautify struct.

func (GenericCodeBeautify) Args

func (GenericCodeBeautify) Args() []core.ArgDef

Args returns the argument definitions.

func (GenericCodeBeautify) Meta

Meta returns the operation metadata.

func (GenericCodeBeautify) Run

func (GenericCodeBeautify) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run beautifies C-style code.

type GetAllCasings

type GetAllCasings struct{}

GetAllCasings produces every combination of upper/lower casing of the input.

func (GetAllCasings) Args

func (GetAllCasings) Args() []core.ArgDef

Args returns the argument definitions.

func (GetAllCasings) Meta

func (GetAllCasings) Meta() core.OpMeta

Meta returns the operation metadata.

func (GetAllCasings) Run

func (GetAllCasings) Run(in *core.Dish, args []any) (*core.Dish, error)

Run produces all casings.

type GetTime

type GetTime struct{}

GetTime returns the current time in the chosen unit.

func (GetTime) Args

func (GetTime) Args() []core.ArgDef

Args returns the argument definitions.

func (GetTime) Meta

func (GetTime) Meta() core.OpMeta

Meta returns the operation metadata.

func (GetTime) Run

func (GetTime) Run(in *core.Dish, args []any) (*core.Dish, error)

Run returns the current time.

type GroupIPAddresses

type GroupIPAddresses struct{}

GroupIPAddresses groups a list of IP addresses into their subnets.

func (GroupIPAddresses) Args

func (GroupIPAddresses) Args() []core.ArgDef

Args returns the argument definitions.

func (GroupIPAddresses) Meta

func (GroupIPAddresses) Meta() core.OpMeta

Meta returns the operation metadata.

func (GroupIPAddresses) Run

func (GroupIPAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run groups the addresses.

type Gunzip

type Gunzip struct{}

Gunzip reads a gzip stream back into the bytes it was made from.

func (Gunzip) Args

func (Gunzip) Args() []core.ArgDef

Args returns the argument definitions.

func (Gunzip) Meta

func (Gunzip) Meta() core.OpMeta

Meta returns the operation metadata.

func (Gunzip) Run

func (Gunzip) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input.

type Gzip

type Gzip struct{}

Gzip compresses the input into a gzip stream.

func (Gzip) Args

func (Gzip) Args() []core.ArgDef

Args returns the argument definitions.

func (Gzip) Meta

func (Gzip) Meta() core.OpMeta

Meta returns the operation metadata.

func (Gzip) Run

func (Gzip) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compresses the input.

type HAS160

type HAS160 struct{}

HAS160 computes the Korean HAS-160 hash.

func (HAS160) Args

func (HAS160) Args() []core.ArgDef

Args returns the argument definitions.

func (HAS160) Meta

func (HAS160) Meta() core.OpMeta

Meta returns the operation metadata.

func (HAS160) Run

func (HAS160) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the HAS-160 hash.

type HASSHClientFingerprint

type HASSHClientFingerprint struct{}

HASSHClientFingerprint generates a HASSH fingerprint from an SSH client Key Exchange Init message.

func (HASSHClientFingerprint) Args

Args returns the argument definitions.

func (HASSHClientFingerprint) Meta

Meta returns the operation metadata.

func (HASSHClientFingerprint) Run

func (HASSHClientFingerprint) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the HASSH fingerprint.

type HASSHServerFingerprint

type HASSHServerFingerprint struct{}

HASSHServerFingerprint generates a HASSH fingerprint from an SSH server Key Exchange Init message.

func (HASSHServerFingerprint) Args

Args returns the argument definitions.

func (HASSHServerFingerprint) Meta

Meta returns the operation metadata.

func (HASSHServerFingerprint) Run

func (HASSHServerFingerprint) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the HASSH server fingerprint.

type HMAC

type HMAC struct{}

HMAC computes a keyed-hash message authentication code.

func (HMAC) Args

func (HMAC) Args() []core.ArgDef

Args returns the argument definitions.

func (HMAC) Meta

func (HMAC) Meta() core.OpMeta

Meta returns the operation metadata.

func (HMAC) Run

func (HMAC) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the HMAC.

type HTMLToText

type HTMLToText struct{}

HTMLToText hands markup on as plain text.

In CyberChef this changes how a result is displayed rather than what it holds: the interface renders a value it has been told is HTML, and this operation passes the same value on as text so the markup is shown as it stands. Nothing renders anything at a command line, so here the input comes straight back.

func (HTMLToText) Args

func (HTMLToText) Args() []core.ArgDef

Args returns the argument definitions.

func (HTMLToText) Meta

func (HTMLToText) Meta() core.OpMeta

Meta returns the operation metadata.

func (HTMLToText) Run

func (HTMLToText) Run(in *core.Dish, args []any) (*core.Dish, error)

Run hands the input back.

type HTTPRequest

type HTTPRequest struct{}

HTTPRequest makes an HTTP request and returns the response.

func (HTTPRequest) Args

func (HTTPRequest) Args() []core.ArgDef

Args returns the argument definitions.

func (HTTPRequest) Meta

func (HTTPRequest) Meta() core.OpMeta

Meta returns the operation metadata.

func (HTTPRequest) Run

func (HTTPRequest) Run(in *core.Dish, args []any) (*core.Dish, error)

Run makes the HTTP request. The Mode argument (browser CORS) is accepted for parity but has no effect here.

type HammingDistance

type HammingDistance struct{}

HammingDistance computes the Hamming distance between two equal-length samples.

func (HammingDistance) Args

func (HammingDistance) Args() []core.ArgDef

Args returns the argument definitions.

func (HammingDistance) Meta

func (HammingDistance) Meta() core.OpMeta

Meta returns the operation metadata.

func (HammingDistance) Run

func (HammingDistance) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the distance.

type HaversineDistance

type HaversineDistance struct{}

HaversineDistance measures the distance between two points on the Earth.

func (HaversineDistance) Args

func (HaversineDistance) Args() []core.ArgDef

Args returns the argument definitions.

func (HaversineDistance) Meta

func (HaversineDistance) Meta() core.OpMeta

Meta returns the operation metadata.

func (HaversineDistance) Run

func (HaversineDistance) Run(in *core.Dish, args []any) (*core.Dish, error)

Run measures the distance.

type Head struct{}

Head keeps the first N sections of the input.

func (Head) Args

func (Head) Args() []core.ArgDef

Args returns the argument definitions.

func (Head) Meta

func (Head) Meta() core.OpMeta

Meta returns the operation metadata.

func (Head) Run

func (Head) Run(in *core.Dish, args []any) (*core.Dish, error)

Run keeps the first sections.

type HeatmapChart

type HeatmapChart struct{}

HeatmapChart bins two-variable data into a grid and shades each cell by how many points fall in it.

func (HeatmapChart) Args

func (HeatmapChart) Args() []core.ArgDef

Args returns the argument definitions.

func (HeatmapChart) Meta

func (HeatmapChart) Meta() core.OpMeta

Meta returns the operation metadata.

func (HeatmapChart) Run

func (HeatmapChart) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the heatmap chart.

type HexDensityChart

type HexDensityChart struct{}

HexDensityChart groups two-variable data into hexagonal cells and shades each by how many points it holds.

func (HexDensityChart) Args

func (HexDensityChart) Args() []core.ArgDef

Args returns the argument definitions.

func (HexDensityChart) Meta

func (HexDensityChart) Meta() core.OpMeta

Meta returns the operation metadata.

func (HexDensityChart) Run

func (HexDensityChart) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the hex density chart.

type HexToObjectIdentifier

type HexToObjectIdentifier struct{}

HexToObjectIdentifier converts the hex of ASN.1 OID content octets back into dotted-decimal notation. Ported from CyberChef's HexToObjectIdentifier, which wraps jsrsasign's KJUR.asn1.ASN1Util.oidHexToInt after stripping whitespace.

func (HexToObjectIdentifier) Args

Args returns the argument definitions.

func (HexToObjectIdentifier) Meta

Meta returns the operation metadata.

func (HexToObjectIdentifier) Run

func (HexToObjectIdentifier) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the hex content octets to an OID string.

type HexToPEM

type HexToPEM struct{}

HexToPEM wraps a hex-encoded DER blob in PEM armor.

func (HexToPEM) Args

func (HexToPEM) Args() []core.ArgDef

Args returns the argument definitions.

func (HexToPEM) Meta

func (HexToPEM) Meta() core.OpMeta

Meta returns the operation metadata.

func (HexToPEM) Run

func (HexToPEM) Run(in *core.Dish, args []any) (*core.Dish, error)

Run wraps the hex DER as PEM. Ported from CyberChef HexToPEM.mjs, which calls jsrsasign's getPEMStringFromHex: the hex is base64-encoded, wrapped at 64 characters, and armored with CRLF line endings and a trailing CRLF.

type IPv6TransitionAddresses

type IPv6TransitionAddresses struct{}

IPv6TransitionAddresses converts between IPv4/MAC and IPv6 transition addresses.

func (IPv6TransitionAddresses) Args

Args returns the argument definitions.

func (IPv6TransitionAddresses) Meta

Meta returns the operation metadata.

func (IPv6TransitionAddresses) Run

func (IPv6TransitionAddresses) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the transition.

type ImageBrightnessContrast

type ImageBrightnessContrast struct{}

ImageBrightnessContrast adjusts image brightness and contrast.

func (ImageBrightnessContrast) Args

Args returns the argument definitions.

func (ImageBrightnessContrast) Meta

Meta returns the operation metadata.

func (ImageBrightnessContrast) Run

func (ImageBrightnessContrast) Run(in *core.Dish, args []any) (*core.Dish, error)

Run adjusts brightness then contrast.

type ImageFilter

type ImageFilter struct{}

ImageFilter applies a greyscale or sepia filter to an image.

func (ImageFilter) Args

func (ImageFilter) Args() []core.ArgDef

Args returns the argument definitions.

func (ImageFilter) Meta

func (ImageFilter) Meta() core.OpMeta

Meta returns the operation metadata.

func (ImageFilter) Run

func (ImageFilter) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the selected filter.

type ImageHueSaturationLightness

type ImageHueSaturationLightness struct{}

ImageHueSaturationLightness adjusts an image's hue, saturation and lightness.

func (ImageHueSaturationLightness) Args

Args returns the argument definitions.

func (ImageHueSaturationLightness) Meta

Meta returns the operation metadata.

func (ImageHueSaturationLightness) Run

func (ImageHueSaturationLightness) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the hue, saturation and lightness adjustments in order.

type ImageOpacity

type ImageOpacity struct{}

ImageOpacity adjusts the opacity of an image. Ported from CyberChef's Image Opacity (Jimp's opacity): each pixel's alpha is multiplied by opacity/100.

func (ImageOpacity) Args

func (ImageOpacity) Args() []core.ArgDef

Args returns the argument definitions.

func (ImageOpacity) Meta

func (ImageOpacity) Meta() core.OpMeta

Meta returns the operation metadata.

func (ImageOpacity) Run

func (ImageOpacity) Run(in *core.Dish, args []any) (*core.Dish, error)

Run adjusts the image opacity.

type IndexOfCoincidence

type IndexOfCoincidence struct{}

IndexOfCoincidence measures how often two letters drawn from the text are the same.

func (IndexOfCoincidence) Args

func (IndexOfCoincidence) Args() []core.ArgDef

Args returns the argument definitions.

func (IndexOfCoincidence) Meta

Meta returns the operation metadata.

func (IndexOfCoincidence) Run

func (IndexOfCoincidence) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run measures the coincidence: how often two letters drawn from the text at random turn out to be the same.

type InvertImage

type InvertImage struct{}

InvertImage inverts the colours of an image. Ported from CyberChef's Invert Image (Jimp's invert): each RGB channel becomes 255-value; alpha is untouched.

func (InvertImage) Args

func (InvertImage) Args() []core.ArgDef

Args returns the argument definitions.

func (InvertImage) Meta

func (InvertImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (InvertImage) Run

func (InvertImage) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run inverts the image colours.

type JA3Fingerprint

type JA3Fingerprint struct{}

JA3Fingerprint generates a JA3 fingerprint from a TLS Client Hello.

func (JA3Fingerprint) Args

func (JA3Fingerprint) Args() []core.ArgDef

Args returns the argument definitions.

func (JA3Fingerprint) Meta

func (JA3Fingerprint) Meta() core.OpMeta

Meta returns the operation metadata.

func (JA3Fingerprint) Run

func (JA3Fingerprint) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the JA3 fingerprint.

type JA3SFingerprint

type JA3SFingerprint struct{}

JA3SFingerprint generates a JA3S fingerprint from a TLS Server Hello.

func (JA3SFingerprint) Args

func (JA3SFingerprint) Args() []core.ArgDef

Args returns the argument definitions.

func (JA3SFingerprint) Meta

func (JA3SFingerprint) Meta() core.OpMeta

Meta returns the operation metadata.

func (JA3SFingerprint) Run

func (JA3SFingerprint) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the JA3S fingerprint.

type JA4Fingerprint

type JA4Fingerprint struct{}

JA4Fingerprint generates a JA4 fingerprint from a TLS Client Hello.

func (JA4Fingerprint) Args

func (JA4Fingerprint) Args() []core.ArgDef

Args returns the argument definitions.

func (JA4Fingerprint) Meta

func (JA4Fingerprint) Meta() core.OpMeta

Meta returns the operation metadata.

func (JA4Fingerprint) Run

func (JA4Fingerprint) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the JA4 fingerprint.

type JA4ServerFingerprint

type JA4ServerFingerprint struct{}

JA4ServerFingerprint generates a JA4S fingerprint from a TLS Server Hello.

func (JA4ServerFingerprint) Args

func (JA4ServerFingerprint) Args() []core.ArgDef

Args returns the argument definitions.

func (JA4ServerFingerprint) Meta

Meta returns the operation metadata.

func (JA4ServerFingerprint) Run

func (JA4ServerFingerprint) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the JA4S fingerprint.

type JPathExpression

type JPathExpression struct{}

JPathExpression extracts information from a JSON object with a JSONPath query. Ported from CyberChef JPathExpression.mjs, which wraps the jsonpath-plus npm library. cchef reimplements the JSONPath evaluator over the order-preserving jsonvalue.go representation (jsonval.Object / []any) so matched values serialize byte-for-byte like jsonpath-plus's results.map(JSON.stringify).join(delimiter), including ECMAScript object key ordering.

Known minor divergences (all on degenerate inputs, compared with the oracle): a query with a trailing unterminated '[' errors here but is ignored by jsonpath-plus; a bare null document returns null here whereas jsonpath-plus throws an uncaught TypeError; and string-coercing an array/object inside a filter yields "" rather than JavaScript's comma-joined form.

func (JPathExpression) Args

func (JPathExpression) Args() []core.ArgDef

Args returns the argument definitions.

func (JPathExpression) Meta

func (JPathExpression) Meta() core.OpMeta

Meta returns the operation metadata.

func (JPathExpression) Run

func (JPathExpression) Run(in *core.Dish, args []any) (*core.Dish, error)

Run evaluates the JSONPath query and joins the serialized matches.

type JSONBeautify

type JSONBeautify struct{}

JSONBeautify indents and pretty-prints JSON. Ported from CyberChef JSONBeautify.mjs, which parses the input leniently with JSON5 and re-emits it with JSON.stringify(value, null, indent). cchef reproduces run()'s plain-string output over a JSON5 parser feeding the shared order-preserving JSON serialiser (jsonvalue.go).

The third argument (Formatted) is inert in cchef: it only controls CyberChef's browser present() view (a collapsible HTML tree), which the CLI does not produce. It is kept so recipes round-trip.

func (JSONBeautify) Args

func (JSONBeautify) Args() []core.ArgDef

Args returns the argument definitions.

func (JSONBeautify) Meta

func (JSONBeautify) Meta() core.OpMeta

Meta returns the operation metadata.

func (JSONBeautify) Run

func (JSONBeautify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run beautifies the JSON input.

type JSONMinify

type JSONMinify struct{}

JSONMinify struct.

func (JSONMinify) Args

func (JSONMinify) Args() []core.ArgDef

Args returns the argument definitions.

func (JSONMinify) Meta

func (JSONMinify) Meta() core.OpMeta

Meta returns the operation metadata.

func (JSONMinify) Run

func (JSONMinify) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run minifies the JSON input. Ported from vkbeautify.jsonmin = JSON.stringify(JSON.parse(text), null, 0); empty input yields "".

type JSONToCSV

type JSONToCSV struct{}

JSONToCSV converts JSON data into CSV (RFC 4180). It reproduces CyberChef's operation: a direct pass over an array of arrays or array of dictionaries, falling back to flattening nested structures into dotted keys (the `flat` npm library) and forcing remaining containers through JSON.stringify.

func (JSONToCSV) Args

func (JSONToCSV) Args() []core.ArgDef

Args returns the argument definitions.

func (JSONToCSV) Meta

func (JSONToCSV) Meta() core.OpMeta

Meta returns the operation metadata.

func (JSONToCSV) Run

func (JSONToCSV) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the JSON input into CSV.

type JSONToYAML

type JSONToYAML struct{}

JSONToYAML formats a JSON value as YAML.

func (JSONToYAML) Args

func (JSONToYAML) Args() []core.ArgDef

Args returns the argument definitions.

func (JSONToYAML) Meta

func (JSONToYAML) Meta() core.OpMeta

Meta returns the operation metadata.

func (JSONToYAML) Run

func (JSONToYAML) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run converts JSON input to YAML.

type JWKToPEM

type JWKToPEM struct{}

JWKToPEM converts JSON Web Keys (a single key, an array, or a JWK Set) into PEM: PKCS#8 for private keys, SPKI for public keys. Ported from CyberChef's JWKToPem.mjs (jsrsasign KEYUTIL.getPEM); only RSA and EC keys are supported, as upstream. Go's crypto/x509 marshaling is byte-identical to jsrsasign for these key types.

func (JWKToPEM) Args

func (JWKToPEM) Args() []core.ArgDef

Args returns the argument definitions.

func (JWKToPEM) Meta

func (JWKToPEM) Meta() core.OpMeta

Meta returns the operation metadata.

func (JWKToPEM) Run

func (JWKToPEM) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts each JWK in the input to PEM and concatenates the results.

type JWTDecode

type JWTDecode struct{}

JWTDecode decodes a JSON Web Token without verifying its signature.

func (JWTDecode) Args

func (JWTDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (JWTDecode) Meta

func (JWTDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (JWTDecode) Run

func (JWTDecode) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decodes the token's payload without checking its signature.

type JWTSign

type JWTSign struct{}

JWTSign signs a JSON object as a JSON Web Token.

func (JWTSign) Args

func (JWTSign) Args() []core.ArgDef

Args returns the argument definitions.

func (JWTSign) Meta

func (JWTSign) Meta() core.OpMeta

Meta returns the operation metadata.

func (JWTSign) Run

func (JWTSign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run signs the input payload as a JWT.

type JWTVerify

type JWTVerify struct{}

JWTVerify verifies a JSON Web Token's signature and returns its payload.

func (JWTVerify) Args

func (JWTVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (JWTVerify) Meta

func (JWTVerify) Meta() core.OpMeta

Meta returns the operation metadata.

func (JWTVerify) Run

func (JWTVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run verifies the token's signature and returns its payload.

type JavaScriptBeautify

type JavaScriptBeautify struct{}

JavaScriptBeautify parses JavaScript (or JSON) and pretty-prints it. Ported from CyberChef JavaScriptBeautify.mjs, which parses with esprima.parseScript and regenerates with escodegen; jsparse.Parse/jsparse.ParseFull and jsbeautify.Generate (jsbeautify_*.go) mirror those. With "Include comments" enabled, comments are collected with source ranges, attached to the AST (a port of estraverse.attachComments), and re-emitted.

func (JavaScriptBeautify) Args

func (JavaScriptBeautify) Args() []core.ArgDef

Args returns the argument definitions.

func (JavaScriptBeautify) Meta

Meta returns the operation metadata.

func (JavaScriptBeautify) Run

func (JavaScriptBeautify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the input and regenerates it in beautified form.

type JavaScriptMinify

type JavaScriptMinify struct{}

JavaScriptMinify compresses JavaScript code. CyberChef wraps the npm `terser` library; there is no logic to port, so this uses esbuild's minifier (pure Go, via github.com/evanw/esbuild/pkg/api) instead. The output is therefore NOT byte-identical to CyberChef's — esbuild and terser use different identifier manglers and compression passes — but is equivalently minified.

func (JavaScriptMinify) Args

func (JavaScriptMinify) Args() []core.ArgDef

Args returns the argument definitions (none, matching CyberChef).

func (JavaScriptMinify) Meta

func (JavaScriptMinify) Meta() core.OpMeta

Meta returns the operation metadata.

func (JavaScriptMinify) Run

func (JavaScriptMinify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run minifies the input with esbuild (whitespace + identifiers + syntax).

type JavaScriptParser

type JavaScriptParser struct{}

JavaScriptParser returns the ESTree AST (as pretty JSON) for JavaScript code. Ported from CyberChef JavaScriptParser.mjs, which wraps esprima.parseScript; the parser mirrors esprima (see jsparser_*.go). The full script grammar is supported byte-for-byte — including classes, async/await, generators/yield, destructuring, and Unicode identifiers. Only the output-shaping options (loc/range/tokens/comment/tolerant) are not yet ported and raise an error rather than diverging. (import/export are syntax errors in script mode, matching esprima.)

func (JavaScriptParser) Args

func (JavaScriptParser) Args() []core.ArgDef

Args returns the argument definitions.

func (JavaScriptParser) Meta

func (JavaScriptParser) Meta() core.OpMeta

Meta returns the operation metadata.

func (JavaScriptParser) Run

func (JavaScriptParser) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the input and returns the AST as JSON.stringify(ast, null, 2).

type Jq

type Jq struct{}

Jq processes the JSON input with a jq query. Ported from CyberChef Jq.mjs, which wraps jq-web (jq compiled to WASM); cchef reimplements it over gojq, a pure-Go jq. It reproduces jq-web's jq.json() collapse of jq's output stream: zero results is an error, a single result is returned directly, and multiple results become a JSON array. The value is then printed raw (when Raw is set and the result is a string) or serialized like JSON.stringify.

func (Jq) Args

func (Jq) Args() []core.ArgDef

Args returns the argument definitions.

func (Jq) Meta

func (Jq) Meta() core.OpMeta

Meta returns the operation metadata.

func (Jq) Run

func (Jq) Run(in *core.Dish, args []any) (*core.Dish, error)

Run evaluates the jq query against the JSON input.

type JsonataQuery

type JsonataQuery struct{}

JsonataQuery reshapes a JSON document with a JSONata expression.

func (JsonataQuery) Args

func (JsonataQuery) Args() []core.ArgDef

Args returns the argument definitions.

func (JsonataQuery) Meta

func (JsonataQuery) Meta() core.OpMeta

Meta returns the operation metadata.

func (JsonataQuery) Run

func (JsonataQuery) Run(in *core.Dish, args []any) (*core.Dish, error)

Run evaluates the expression against the input document.

type Jump

type Jump struct{}

Jump moves execution to a label.

func (Jump) Args

func (Jump) Args() []core.ArgDef

Args returns the label and how many times a backwards jump may be taken.

func (Jump) Meta

func (Jump) Meta() core.OpMeta

Meta returns the operation metadata.

func (Jump) Run

func (Jump) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through; outside a recipe there is nowhere to jump.

func (Jump) RunFlow

func (Jump) RunFlow(state *core.FlowState) error

RunFlow jumps.

type Keccak

type Keccak struct{}

Keccak computes a legacy Keccak digest (as used by e.g. Ethereum), which differs from SHA-3 in its padding.

func (Keccak) Args

func (Keccak) Args() []core.ArgDef

Args returns the argument definitions.

func (Keccak) Meta

func (Keccak) Meta() core.OpMeta

Meta returns the operation metadata.

func (Keccak) Run

func (Keccak) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the digest. The widely-used 256- and 512-bit sizes use the vetted golang.org/x/crypto/sha3 legacy-Keccak constructors; 224 and 384 (not provided by that package) use the local Keccak-f sponge, which is cross-validated against the library for 256/512 in the tests.

type LMHash

type LMHash struct{}

LMHash computes an LM (LAN Manager) hash. Ported from CyberChef LMHash.mjs (which wraps the ntlm npm package); the algorithm is implemented in-repo using the standard crypto/des primitive.

func (LMHash) Args

func (LMHash) Args() []core.ArgDef

Args returns the argument definitions.

func (LMHash) Meta

func (LMHash) Meta() core.OpMeta

Meta returns the operation metadata.

func (LMHash) Run

func (LMHash) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the LM hash.

type LS47Decrypt

type LS47Decrypt struct{}

LS47Decrypt decrypts with the LS47 cipher.

func (LS47Decrypt) Args

func (LS47Decrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (LS47Decrypt) Meta

func (LS47Decrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (LS47Decrypt) Run

func (LS47Decrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts the input.

type LS47Encrypt

type LS47Encrypt struct{}

LS47Encrypt encrypts with the LS47 cipher.

func (LS47Encrypt) Args

func (LS47Encrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (LS47Encrypt) Meta

func (LS47Encrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (LS47Encrypt) Run

func (LS47Encrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts the input.

type LZ4Compress

type LZ4Compress struct{}

LZ4Compress compresses the input into an LZ4 frame.

func (LZ4Compress) Args

func (LZ4Compress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZ4Compress) Meta

func (LZ4Compress) Meta() core.OpMeta

Meta returns the operation metadata.

func (LZ4Compress) Run

func (LZ4Compress) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run compresses the input.

type LZ4Decompress

type LZ4Decompress struct{}

LZ4Decompress reads an LZ4 frame back into the bytes it was made from.

func (LZ4Decompress) Args

func (LZ4Decompress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZ4Decompress) Meta

func (LZ4Decompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (LZ4Decompress) Run

func (LZ4Decompress) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decompresses the input.

type LZMACompress

type LZMACompress struct{}

LZMACompress compresses the input into an LZMA stream.

func (LZMACompress) Args

func (LZMACompress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZMACompress) Meta

func (LZMACompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (LZMACompress) Run

func (LZMACompress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compresses the input.

type LZMADecompress

type LZMADecompress struct{}

LZMADecompress reads an LZMA stream back into the bytes it was made from.

func (LZMADecompress) Args

func (LZMADecompress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZMADecompress) Meta

func (LZMADecompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (LZMADecompress) Run

func (LZMADecompress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input.

type LZNT1Decompress

type LZNT1Decompress struct{}

LZNT1Decompress reads an LZNT1 stream back into the bytes it was made from.

func (LZNT1Decompress) Args

func (LZNT1Decompress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZNT1Decompress) Meta

func (LZNT1Decompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (LZNT1Decompress) Run

func (LZNT1Decompress) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decompresses the input.

type LZStringCompress

type LZStringCompress struct{}

LZStringCompress compresses text with lz-string.

func (LZStringCompress) Args

func (LZStringCompress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZStringCompress) Meta

func (LZStringCompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (LZStringCompress) Run

func (LZStringCompress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compresses the input.

type LZStringDecompress

type LZStringDecompress struct{}

LZStringDecompress reads text back out of an lz-string stream.

func (LZStringDecompress) Args

func (LZStringDecompress) Args() []core.ArgDef

Args returns the argument definitions.

func (LZStringDecompress) Meta

Meta returns the operation metadata.

func (LZStringDecompress) Run

func (LZStringDecompress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input.

type Label

type Label struct{}

Label marks a place in a recipe for a jump to return to.

func (Label) Args

func (Label) Args() []core.ArgDef

Args returns the label name.

func (Label) Meta

func (Label) Meta() core.OpMeta

Meta returns the operation metadata.

func (Label) Run

func (Label) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through.

func (Label) RunFlow

func (Label) RunFlow(state *core.FlowState) error

RunFlow leaves the recipe alone; the jumps look the label up themselves.

type LevenshteinDistance

type LevenshteinDistance struct{}

LevenshteinDistance computes the weighted edit distance between two samples.

func (LevenshteinDistance) Args

func (LevenshteinDistance) Args() []core.ArgDef

Args returns the argument definitions.

func (LevenshteinDistance) Meta

Meta returns the operation metadata.

func (LevenshteinDistance) Run

func (LevenshteinDistance) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the distance.

type Lorenz

type Lorenz struct{}

Lorenz emulates the Lorenz SZ40/42 cipher attachment.

func (Lorenz) Args

func (Lorenz) Args() []core.ArgDef

Args returns the argument definitions (31 args, matching CyberChef's layout).

func (Lorenz) Meta

func (Lorenz) Meta() core.OpMeta

Meta returns the operation metadata.

func (Lorenz) Run

func (Lorenz) Run(in *core.Dish, args []any) (*core.Dish, error)

Run enciphers/deciphers with the Lorenz machine.

type LuhnChecksum

type LuhnChecksum struct{}

LuhnChecksum computes the Luhn mod-N checksum, check digit, and the validated string.

func (LuhnChecksum) Args

func (LuhnChecksum) Args() []core.ArgDef

Args returns the argument definitions.

func (LuhnChecksum) Meta

func (LuhnChecksum) Meta() core.OpMeta

Meta returns the operation metadata.

func (LuhnChecksum) Run

func (LuhnChecksum) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the Luhn checksum report.

type MD2

type MD2 struct{}

MD2 computes the RFC 1319 MD2 hash.

func (MD2) Args

func (MD2) Args() []core.ArgDef

Args returns the argument definitions.

func (MD2) Meta

func (MD2) Meta() core.OpMeta

Meta returns the operation metadata.

func (MD2) Run

func (MD2) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the MD2 hash.

type MD4

type MD4 struct{}

MD4 computes the RFC 1320 MD4 hash.

func (MD4) Args

func (MD4) Args() []core.ArgDef

Args returns the argument definitions.

func (MD4) Meta

func (MD4) Meta() core.OpMeta

Meta returns the operation metadata.

func (MD4) Run

func (MD4) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the MD4 hash.

type MD6

type MD6 struct{}

MD6 computes the MD6 hash. Ported from CyberChef MD6.mjs (which wraps the self-contained node-md6 package); the algorithm is reimplemented from that package, which is a standard MD6 implementation.

func (MD6) Args

func (MD6) Args() []core.ArgDef

Args returns the argument definitions.

func (MD6) Meta

func (MD6) Meta() core.OpMeta

Meta returns the operation metadata.

func (MD6) Run

func (MD6) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the MD6 digest.

type MIMEDecoding

type MIMEDecoding struct{}

MIMEDecoding decodes RFC 2047 MIME encoded-word header extensions.

func (MIMEDecoding) Args

func (MIMEDecoding) Args() []core.ArgDef

Args returns the argument definitions.

func (MIMEDecoding) Meta

func (MIMEDecoding) Meta() core.OpMeta

Meta returns the operation metadata.

func (MIMEDecoding) Run

func (MIMEDecoding) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decodes MIME encoded-word header extensions.

type MOD

type MOD struct{}

MOD reduces every number in a list by a modulus.

func (MOD) Args

func (MOD) Args() []core.ArgDef

Args returns the modulus and the delimiter the input is split on.

func (MOD) Meta

func (MOD) Meta() core.OpMeta

Meta returns the operation metadata.

func (MOD) Run

func (MOD) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reduces each number, reporting the results separated by spaces whatever the input was separated by.

type Magic

type Magic struct{}

Magic detects what data might be and suggests recipes to make sense of it.

func (Magic) Args

func (Magic) Args() []core.ArgDef

Args returns how deep to look, whether to brute-force, whether to weigh the wider set of languages, and a string the answer is expected to contain.

func (Magic) Meta

func (Magic) Meta() core.OpMeta

Meta returns the operation metadata.

func (Magic) Run

func (Magic) Run(in *core.Dish, args []any) (*core.Dish, error)

Run analyses the input and reports the recipes worth trying.

type Mean

type Mean struct{}

Mean computes the mean (average) of a list of numbers.

func (Mean) Args

func (Mean) Args() []core.ArgDef

Args returns the argument definitions.

func (Mean) Meta

func (Mean) Meta() core.OpMeta

Meta returns the operation metadata.

func (Mean) Run

func (Mean) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type Median

type Median struct{}

Median computes the median of a list of numbers.

func (Median) Args

func (Median) Args() []core.ArgDef

Args returns the argument definitions.

func (Median) Meta

func (Median) Meta() core.OpMeta

Meta returns the operation metadata.

func (Median) Run

func (Median) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type Merge

type Merge struct{}

Merge closes a Fork or Subsection.

func (Merge) Args

func (Merge) Args() []core.ArgDef

Args returns whether every branch is merged or only the nearest one.

func (Merge) Meta

func (Merge) Meta() core.OpMeta

Meta returns the operation metadata.

func (Merge) Run

func (Merge) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through.

func (Merge) RunFlow

func (Merge) RunFlow(state *core.FlowState) error

RunFlow does nothing: the Fork or Subsection above has already merged when it found this step while collecting its sub-recipe.

type MicrosoftScriptDecoder

type MicrosoftScriptDecoder struct{}

MicrosoftScriptDecoder struct.

func (MicrosoftScriptDecoder) Args

Args returns the argument definitions.

func (MicrosoftScriptDecoder) Meta

Meta returns the operation metadata.

func (MicrosoftScriptDecoder) Run

func (MicrosoftScriptDecoder) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run extracts and decodes an encoded Microsoft script; non-matching input yields an empty string.

type ModularExponentiation added in v1.1.0

type ModularExponentiation struct{}

ModularExponentiation raises a base to an exponent modulo a modulus.

func (ModularExponentiation) Args added in v1.1.0

Args returns the argument definitions.

func (ModularExponentiation) Meta added in v1.1.0

Meta returns the operation metadata.

func (ModularExponentiation) Run added in v1.1.0

func (ModularExponentiation) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the base raised to the exponent, modulo the modulus.

type ModularInverse

type ModularInverse struct{}

ModularInverse finds the number that multiplies with a to give one, modulo m.

func (ModularInverse) Args

func (ModularInverse) Args() []core.ArgDef

Args returns the value and the modulus, either of which may be left blank to take it from the input instead.

func (ModularInverse) Meta

func (ModularInverse) Meta() core.OpMeta

Meta returns the operation metadata.

func (ModularInverse) Run

func (ModularInverse) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports the inverse, or says why there is not one.

type MultipleBombe

type MultipleBombe struct{}

MultipleBombe runs the Bombe over many rotor configurations.

func (MultipleBombe) Args

func (MultipleBombe) Args() []core.ArgDef

Args returns the argument definitions.

func (MultipleBombe) Meta

func (MultipleBombe) Meta() core.OpMeta

Meta returns the operation metadata.

func (MultipleBombe) Run

func (MultipleBombe) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the multi-configuration attack.

type Multiply

type Multiply struct{}

Multiply multiplies a list of numbers.

func (Multiply) Args

func (Multiply) Args() []core.ArgDef

Args returns the argument definitions.

func (Multiply) Meta

func (Multiply) Meta() core.OpMeta

Meta returns the operation metadata.

func (Multiply) Run

func (Multiply) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type MurmurHash3

type MurmurHash3 struct{}

MurmurHash3 computes the 32-bit MurmurHash v3 (x86_32 variant) of the input, with an optional seed. Ported from CyberChef's MurmurHash3 (based on Gary Court's murmurhash-js): each input character contributes its low byte, and the result is returned as an unsigned (or optionally signed) 32-bit integer.

func (MurmurHash3) Args

func (MurmurHash3) Args() []core.ArgDef

Args returns the argument definitions.

func (MurmurHash3) Meta

func (MurmurHash3) Meta() core.OpMeta

Meta returns the operation metadata.

func (MurmurHash3) Run

func (MurmurHash3) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the hash and formats it as a signed or unsigned integer.

type NOT

type NOT struct{}

NOT inverts each byte.

func (NOT) Args

func (NOT) Args() []core.ArgDef

Args returns the argument definitions.

func (NOT) Meta

func (NOT) Meta() core.OpMeta

Meta returns the operation metadata.

func (NOT) Run

func (NOT) Run(in *core.Dish, args []any) (*core.Dish, error)

Run inverts each byte.

type NTHash

type NTHash struct{}

NTHash computes an NT (NTLM) hash: MD4 over the UTF-16LE-encoded input.

func (NTHash) Args

func (NTHash) Args() []core.ArgDef

Args returns the argument definitions.

func (NTHash) Meta

func (NTHash) Meta() core.OpMeta

Meta returns the operation metadata.

func (NTHash) Run

func (NTHash) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the NT hash.

type NormaliseImage

type NormaliseImage struct{}

NormaliseImage stretches each colour channel to the full 0-255 range.

func (NormaliseImage) Args

func (NormaliseImage) Args() []core.ArgDef

Args returns the argument definitions.

func (NormaliseImage) Meta

func (NormaliseImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (NormaliseImage) Run

func (NormaliseImage) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run normalises the image.

type NormaliseUnicode

type NormaliseUnicode struct{}

NormaliseUnicode transforms text to one of the Unicode Normalisation Forms.

func (NormaliseUnicode) Args

func (NormaliseUnicode) Args() []core.ArgDef

Args returns the argument definitions.

func (NormaliseUnicode) Meta

func (NormaliseUnicode) Meta() core.OpMeta

Meta returns the operation metadata.

func (NormaliseUnicode) Run

func (NormaliseUnicode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run normalises the input to the selected form.

type Numberwang

type Numberwang struct{}

Numberwang plays Numberwang.

func (Numberwang) Args

func (Numberwang) Args() []core.ArgDef

Args returns the argument definitions.

func (Numberwang) Meta

func (Numberwang) Meta() core.OpMeta

Meta returns the operation metadata.

func (Numberwang) Run

func (Numberwang) Run(in *core.Dish, args []any) (*core.Dish, error)

Run says whether the input is Numberwang, and offers a fact.

type OR

type OR struct{}

OR ORs the input with a repeating key.

func (OR) Args

func (OR) Args() []core.ArgDef

Args returns the argument definitions.

func (OR) Meta

func (OR) Meta() core.OpMeta

Meta returns the operation metadata.

func (OR) Run

func (OR) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the OR.

type ObjectIdentifierToHex

type ObjectIdentifierToHex struct{}

ObjectIdentifierToHex converts a dotted-decimal OID into the hex of its ASN.1 content octets. Ported from CyberChef's ObjectIdentifierToHex, which wraps jsrsasign's KJUR.asn1.ASN1Util.oidIntToHex.

func (ObjectIdentifierToHex) Args

Args returns the argument definitions.

func (ObjectIdentifierToHex) Meta

Meta returns the operation metadata.

func (ObjectIdentifierToHex) Run

func (ObjectIdentifierToHex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the OID string to hex.

type OffsetChecker

type OffsetChecker struct{}

OffsetChecker highlights the offsets that are common across all samples.

func (OffsetChecker) Args

func (OffsetChecker) Args() []core.ArgDef

Args returns the argument definitions.

func (OffsetChecker) Meta

func (OffsetChecker) Meta() core.OpMeta

Meta returns the operation metadata.

func (OffsetChecker) Run

func (OffsetChecker) Run(in *core.Dish, args []any) (*core.Dish, error)

Run highlights common offsets.

type OpticalCharacterRecognition

type OpticalCharacterRecognition struct{}

OpticalCharacterRecognition reads text out of an image. cchef drives the locally installed `tesseract` binary instead: the only cgo-free Go bindings run Tesseract under a WebAssembly runtime, and the one library doing so is unmaintained, so shelling out is what keeps cchef a single static binary. Same engine and language data, so the recognised text matches.

func (OpticalCharacterRecognition) Args

Args returns the argument definitions.

func (OpticalCharacterRecognition) Meta

Meta returns the operation metadata.

func (OpticalCharacterRecognition) Run

func (OpticalCharacterRecognition) Run(in *core.Dish, args []any) (*core.Dish, error)

Run recognises text in the image.

type PEMToHex

type PEMToHex struct{}

PEMToHex extracts the DER content of PEM blocks as a hex string.

func (PEMToHex) Args

func (PEMToHex) Args() []core.ArgDef

Args returns the argument definitions.

func (PEMToHex) Meta

func (PEMToHex) Meta() core.OpMeta

Meta returns the operation metadata.

func (PEMToHex) Run

func (PEMToHex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the PEM blocks to hex. Ported from CyberChef PEMToHex.mjs: each "-----BEGIN <type>-----" header is paired with its matching footer, the base64 body between them is leniently decoded, and the blocks' hex is joined with newlines.

type PEMToJWK

type PEMToJWK struct{}

PEMToJWK converts PEM keys and certificates to JSON Web Key format. Ported from CyberChef's PEMToJWK.mjs (jsrsasign KEYUTIL.getJWKFromKey): each PEM block is scanned out, parsed, and emitted as a compact JWK; multiple keys are newline-separated. Only RSA and EC keys are supported, as upstream.

func (PEMToJWK) Args

func (PEMToJWK) Args() []core.ArgDef

Args returns the argument definitions.

func (PEMToJWK) Meta

func (PEMToJWK) Meta() core.OpMeta

Meta returns the operation metadata.

func (PEMToJWK) Run

func (PEMToJWK) Run(in *core.Dish, args []any) (*core.Dish, error)

Run scans each PEM block from the input and converts it to a JWK.

type PGPDecrypt

type PGPDecrypt struct{}

PGPDecrypt decrypts a message with the recipient's private key.

func (PGPDecrypt) Args

func (PGPDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (PGPDecrypt) Meta

func (PGPDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (PGPDecrypt) Run

func (PGPDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts the input.

type PGPDecryptAndVerify

type PGPDecryptAndVerify struct{}

PGPDecryptAndVerify decrypts and verifies a message.

func (PGPDecryptAndVerify) Args

func (PGPDecryptAndVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (PGPDecryptAndVerify) Meta

Meta returns the operation metadata.

func (PGPDecryptAndVerify) Run

func (PGPDecryptAndVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts and verifies the input.

type PGPEncrypt

type PGPEncrypt struct{}

PGPEncrypt encrypts a message with a recipient's public key.

func (PGPEncrypt) Args

func (PGPEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (PGPEncrypt) Meta

func (PGPEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (PGPEncrypt) Run

func (PGPEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts the input.

type PGPEncryptAndSign

type PGPEncryptAndSign struct{}

PGPEncryptAndSign encrypts and signs a message.

func (PGPEncryptAndSign) Args

func (PGPEncryptAndSign) Args() []core.ArgDef

Args returns the argument definitions.

func (PGPEncryptAndSign) Meta

func (PGPEncryptAndSign) Meta() core.OpMeta

Meta returns the operation metadata.

func (PGPEncryptAndSign) Run

func (PGPEncryptAndSign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts and signs the input.

type PGPSign

type PGPSign struct{}

PGPSign signs a message with the signer's private key.

func (PGPSign) Args

func (PGPSign) Args() []core.ArgDef

Args returns the argument definitions.

func (PGPSign) Meta

func (PGPSign) Meta() core.OpMeta

Meta returns the operation metadata.

func (PGPSign) Run

func (PGPSign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run signs the input.

type PGPVerify

type PGPVerify struct{}

PGPVerify verifies a signed message with the signer's public key.

func (PGPVerify) Args

func (PGPVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (PGPVerify) Meta

func (PGPVerify) Meta() core.OpMeta

Meta returns the operation metadata.

func (PGPVerify) Run

func (PGPVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run verifies the input.

type PHPDeserialize

type PHPDeserialize struct{}

PHPDeserialize struct.

func (PHPDeserialize) Args

func (PHPDeserialize) Args() []core.ArgDef

Args returns the argument definitions.

func (PHPDeserialize) Meta

func (PHPDeserialize) Meta() core.OpMeta

Meta returns the operation metadata.

func (PHPDeserialize) Run

func (PHPDeserialize) Run(in *core.Dish, args []any) (*core.Dish, error)

Run deserialises PHP serialized input.

type PHPSerialize

type PHPSerialize struct{}

PHPSerialize struct.

func (PHPSerialize) Args

func (PHPSerialize) Args() []core.ArgDef

Args returns the argument definitions.

func (PHPSerialize) Meta

func (PHPSerialize) Meta() core.OpMeta

Meta returns the operation metadata.

func (PHPSerialize) Run

func (PHPSerialize) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run serialises the JSON input to PHP serialized form.

type PRESENTDecrypt

type PRESENTDecrypt struct{}

PRESENTDecrypt decrypts PRESENT ciphertext.

func (PRESENTDecrypt) Args

func (PRESENTDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (PRESENTDecrypt) Meta

func (PRESENTDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (PRESENTDecrypt) Run

func (PRESENTDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type PRESENTEncrypt

type PRESENTEncrypt struct{}

PRESENTEncrypt encrypts input with the PRESENT block cipher.

func (PRESENTEncrypt) Args

func (PRESENTEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (PRESENTEncrypt) Meta

func (PRESENTEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (PRESENTEncrypt) Run

func (PRESENTEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type PRNG

type PRNG struct{}

PRNG generates cryptographically-random data in the chosen format.

func (PRNG) Args

func (PRNG) Args() []core.ArgDef

Args returns the argument definitions.

func (PRNG) Meta

func (PRNG) Meta() core.OpMeta

Meta returns the operation metadata.

func (PRNG) Run

func (PRNG) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the random data.

type PadLines

type PadLines struct{}

PadLines pads each line at the start or end by a number of characters.

func (PadLines) Args

func (PadLines) Args() []core.ArgDef

Args returns the argument definitions.

func (PadLines) Meta

func (PadLines) Meta() core.OpMeta

Meta returns the operation metadata.

func (PadLines) Run

func (PadLines) Run(in *core.Dish, args []any) (*core.Dish, error)

Run pads each line.

type ParityBit

type ParityBit struct{}

ParityBit adds or removes a parity bit on a string of binary digits. Ported from CyberChef's ParityBit operation (and its lib/ParityBit.mjs helpers): with a delimiter set, each delimited token is handled independently.

func (ParityBit) Args

func (ParityBit) Args() []core.ArgDef

Args returns the argument definitions.

func (ParityBit) Meta

func (ParityBit) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParityBit) Run

func (ParityBit) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the parity operation to the input (per delimited token if a delimiter is given).

type ParseASN1HexString

type ParseASN1HexString struct{}

ParseASN1HexString parses ASN.1 data given as a hex string into a text tree. It follows jsrsasign's ASN1HEX.dump (the library CyberChef's "Parse ASN.1 hex string" operation wraps): a recursive walk over BER/DER Type-Length-Value structures producing an indented, human-readable dump.

func (ParseASN1HexString) Args

func (ParseASN1HexString) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseASN1HexString) Meta

Meta returns the operation metadata.

func (ParseASN1HexString) Run

func (ParseASN1HexString) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the ASN.1 hex string starting at the given (hex-character) index, truncating long primitive values to the given length.

type ParseCSR

type ParseCSR struct{}

ParseCSR renders a Certificate Signing Request in a human-readable form, ported from CyberChef's ParseCSR.mjs (jsrsasign CSRUtil.getParam). The request is walked directly over its DER hex using the shared asn1* helpers.

func (ParseCSR) Args

func (ParseCSR) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseCSR) Meta

func (ParseCSR) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseCSR) Run

func (ParseCSR) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the CSR and renders its description.

type ParseColourCode

type ParseColourCode struct{}

ParseColourCode parses a colour (hex/rgb/hsl/cmyk) and converts between formats.

func (ParseColourCode) Args

func (ParseColourCode) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseColourCode) Meta

func (ParseColourCode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseColourCode) Run

func (ParseColourCode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the colour.

type ParseDateTime

type ParseDateTime struct{}

ParseDateTime parses a datetime string and reports its components.

func (ParseDateTime) Args

func (ParseDateTime) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseDateTime) Meta

func (ParseDateTime) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseDateTime) Run

func (ParseDateTime) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses and describes the datetime.

type ParseEthernetFrame

type ParseEthernetFrame struct{}

ParseEthernetFrame parses an Ethernet II frame, including VLAN tags.

func (ParseEthernetFrame) Args

func (ParseEthernetFrame) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseEthernetFrame) Meta

Meta returns the operation metadata.

func (ParseEthernetFrame) Run

func (ParseEthernetFrame) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the frame.

type ParseIPRange

type ParseIPRange struct{}

ParseIPRange enumerates and describes an IPv4/IPv6 CIDR, hyphenated range, or list of addresses.

func (ParseIPRange) Args

func (ParseIPRange) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseIPRange) Meta

func (ParseIPRange) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseIPRange) Run

func (ParseIPRange) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the range.

type ParseIPv4Header

type ParseIPv4Header struct{}

ParseIPv4Header parses an IPv4 header, rendering it as a table or extracting the payload.

func (ParseIPv4Header) Args

func (ParseIPv4Header) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseIPv4Header) Meta

func (ParseIPv4Header) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseIPv4Header) Run

func (ParseIPv4Header) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the header.

type ParseIPv6Address

type ParseIPv6Address struct{}

ParseIPv6Address parses an IPv6 address and reports its type and details.

func (ParseIPv6Address) Args

func (ParseIPv6Address) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseIPv6Address) Meta

func (ParseIPv6Address) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseIPv6Address) Run

func (ParseIPv6Address) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the address.

type ParseObjectIDTimestamp

type ParseObjectIDTimestamp struct{}

ParseObjectIDTimestamp extracts the embedded timestamp from a MongoDB ObjectID.

func (ParseObjectIDTimestamp) Args

Args returns the argument definitions.

func (ParseObjectIDTimestamp) Meta

Meta returns the operation metadata.

func (ParseObjectIDTimestamp) Run

func (ParseObjectIDTimestamp) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the timestamp.

type ParseQRCode

type ParseQRCode struct{}

ParseQRCode reads a QR code out of an image. Ported from CyberChef's Parse QR Code, which preprocesses with Jimp and reads with jsQR.

func (ParseQRCode) Args

func (ParseQRCode) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseQRCode) Meta

func (ParseQRCode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseQRCode) Run

func (ParseQRCode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reads the code.

type ParseSSHHostKey

type ParseSSHHostKey struct{}

ParseSSHHostKey parses an SSH host key into its type and parameters.

func (ParseSSHHostKey) Args

func (ParseSSHHostKey) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseSSHHostKey) Meta

func (ParseSSHHostKey) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseSSHHostKey) Run

func (ParseSSHHostKey) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the key.

type ParseTCP

type ParseTCP struct{}

ParseTCP parses a TCP segment header (and options) into a JSON object.

func (ParseTCP) Args

func (ParseTCP) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseTCP) Meta

func (ParseTCP) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseTCP) Run

func (ParseTCP) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the segment.

type ParseTLSRecord

type ParseTLSRecord struct{}

ParseTLSRecord parses one or more raw TLS records into structured JSON.

func (ParseTLSRecord) Args

func (ParseTLSRecord) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseTLSRecord) Meta

func (ParseTLSRecord) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseTLSRecord) Run

func (ParseTLSRecord) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the records.

type ParseTLV

type ParseTLV struct{}

ParseTLV converts a Type-Length-Value encoded string into JSON.

func (ParseTLV) Args

func (ParseTLV) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseTLV) Meta

func (ParseTLV) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseTLV) Run

func (ParseTLV) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the input as TLV data.

type ParseUDP

type ParseUDP struct{}

ParseUDP parses a UDP datagram header into a JSON object.

func (ParseUDP) Args

func (ParseUDP) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseUDP) Meta

func (ParseUDP) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseUDP) Run

func (ParseUDP) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the datagram.

type ParseUNIXFilePermissions

type ParseUNIXFilePermissions struct{}

ParseUNIXFilePermissions describes a UNIX permission string (octal or textual).

func (ParseUNIXFilePermissions) Args

Args returns the argument definitions.

func (ParseUNIXFilePermissions) Meta

Meta returns the operation metadata.

func (ParseUNIXFilePermissions) Run

func (ParseUNIXFilePermissions) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the permissions.

type ParseURI

type ParseURI struct{}

ParseURI breaks a URI into its component parts.

func (ParseURI) Args

func (ParseURI) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseURI) Meta

func (ParseURI) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseURI) Run

func (ParseURI) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the URI.

type ParseUserAgent

type ParseUserAgent struct{}

ParseUserAgent identifies the browser, device, engine, OS and CPU described by a user-agent string.

func (ParseUserAgent) Args

func (ParseUserAgent) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseUserAgent) Meta

func (ParseUserAgent) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseUserAgent) Run

func (ParseUserAgent) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the user agent.

type ParseX509CRL

type ParseX509CRL struct{}

ParseX509CRL parses a Certificate Revocation List into a human-readable dump. The container is walked directly over its DER hex using the shared asn1* helpers.

func (ParseX509CRL) Args

func (ParseX509CRL) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseX509CRL) Meta

func (ParseX509CRL) Meta() core.OpMeta

Meta returns the operation metadata.

func (ParseX509CRL) Run

func (ParseX509CRL) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the CRL and renders the openssl-like description.

type ParseX509Certificate

type ParseX509Certificate struct{}

ParseX509Certificate renders an X.509 certificate in an openssl-like human readable form. The certificate is walked directly over its DER hex.

func (ParseX509Certificate) Args

func (ParseX509Certificate) Args() []core.ArgDef

Args returns the argument definitions.

func (ParseX509Certificate) Meta

Meta returns the operation metadata.

func (ParseX509Certificate) Run

func (ParseX509Certificate) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the certificate and renders its description.

type PlayMedia

type PlayMedia struct{}

PlayMedia validates that the input is an audio or video file and passes the bytes through. Ported from CyberChef PlayMedia.mjs, whose browser <audio>/ <video> presentation is dropped; cchef offers Raw or base64 data-URI output.

func (PlayMedia) Args

func (PlayMedia) Args() []core.ArgDef

Args returns the argument definitions.

func (PlayMedia) Meta

func (PlayMedia) Meta() core.OpMeta

Meta returns the operation metadata.

func (PlayMedia) Run

func (PlayMedia) Run(in *core.Dish, args []any) (*core.Dish, error)

Run validates the media and passes its bytes through.

type PlistViewer

type PlistViewer struct{}

PlistViewer lays a property list out in a form that can be read.

func (PlistViewer) Args

func (PlistViewer) Args() []core.ArgDef

Args returns the argument definitions.

func (PlistViewer) Meta

func (PlistViewer) Meta() core.OpMeta

Meta returns the operation metadata.

func (PlistViewer) Run

func (PlistViewer) Run(in *core.Dish, args []any) (*core.Dish, error)

Run lays the property list out.

type PowerSet

type PowerSet struct{}

PowerSet calculates all the subsets of a set.

func (PowerSet) Args

func (PowerSet) Args() []core.ArgDef

Args returns the argument definitions.

func (PowerSet) Meta

func (PowerSet) Meta() core.OpMeta

Meta returns the operation metadata.

func (PowerSet) Run

func (PowerSet) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the power set of the input. Each subset is joined by the item delimiter, subsets are ordered by their joined-string length, and each is followed by a newline.

type ProtobufDecode

type ProtobufDecode struct{}

ProtobufDecode decodes protobuf wire data to JSON, with or without a schema.

func (ProtobufDecode) Args

func (ProtobufDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (ProtobufDecode) Meta

func (ProtobufDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ProtobufDecode) Run

func (ProtobufDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the protobuf data.

type ProtobufEncode

type ProtobufEncode struct{}

ProtobufEncode encodes a JSON object into protobuf wire data using a schema.

func (ProtobufEncode) Args

func (ProtobufEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (ProtobufEncode) Meta

func (ProtobufEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ProtobufEncode) Run

func (ProtobufEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input JSON.

type PseudoRandomIntegerGenerator

type PseudoRandomIntegerGenerator struct{}

PseudoRandomIntegerGenerator draws integers from a range.

func (PseudoRandomIntegerGenerator) Args

Args returns the argument definitions.

func (PseudoRandomIntegerGenerator) Meta

Meta returns the operation metadata.

func (PseudoRandomIntegerGenerator) Run

func (PseudoRandomIntegerGenerator) Run(in *core.Dish, args []any) (*core.Dish, error)

Run draws the integers.

type PubKeyFromCert

type PubKeyFromCert struct{}

PubKeyFromCert extracts the Public Key from one or more X.509 certificates. Faithful port of CyberChef's PubKeyFromCert.mjs: each PEM certificate block is located, its SubjectPublicKeyInfo extracted, and emitted as a PUBLIC KEY PEM block (CRLF line endings). RSA, EC and DSA keys are supported, as upstream.

func (PubKeyFromCert) Args

func (PubKeyFromCert) Args() []core.ArgDef

Args returns the argument definitions.

func (PubKeyFromCert) Meta

func (PubKeyFromCert) Meta() core.OpMeta

Meta returns the operation metadata.

func (PubKeyFromCert) Run

func (PubKeyFromCert) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run extracts each certificate's public key, concatenating the PEM blocks.

type PubKeyFromPrivKey

type PubKeyFromPrivKey struct{}

PubKeyFromPrivKey extracts the Public Key from one or more Private Keys. Faithful port of CyberChef's PubKeyFromPrivKey.mjs (jsrsasign KEYUTIL.getKey): each private-key PEM block is located, parsed, and its public key emitted as a PUBLIC KEY PEM block (CRLF line endings). RSA, EC and DSA keys are supported; DSA in PKCS#8 and EdDSA are rejected, as upstream.

func (PubKeyFromPrivKey) Args

func (PubKeyFromPrivKey) Args() []core.ArgDef

Args returns the argument definitions.

func (PubKeyFromPrivKey) Meta

func (PubKeyFromPrivKey) Meta() core.OpMeta

Meta returns the operation metadata.

func (PubKeyFromPrivKey) Run

func (PubKeyFromPrivKey) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run extracts each private key's public key, concatenating the PEM blocks.

type RAKE

type RAKE struct{}

RAKE picks the keywords out of a piece of text.

func (RAKE) Args

func (RAKE) Args() []core.ArgDef

Args returns the argument definitions.

func (RAKE) Meta

func (RAKE) Meta() core.OpMeta

Meta returns the operation metadata.

func (RAKE) Run

func (RAKE) Run(in *core.Dish, args []any) (*core.Dish, error)

Run scores the phrases of the input and lists them, highest first.

type RC2Decrypt

type RC2Decrypt struct{}

RC2Decrypt decrypts RC2 ciphertext.

func (RC2Decrypt) Args

func (RC2Decrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (RC2Decrypt) Meta

func (RC2Decrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (RC2Decrypt) Run

func (RC2Decrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type RC2Encrypt

type RC2Encrypt struct{}

RC2Encrypt encrypts input with the RC2 block cipher.

func (RC2Encrypt) Args

func (RC2Encrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (RC2Encrypt) Meta

func (RC2Encrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (RC2Encrypt) Run

func (RC2Encrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type RC4

type RC4 struct{}

RC4 is the RC4 stream cipher.

func (RC4) Args

func (RC4) Args() []core.ArgDef

Args returns the argument definitions.

func (RC4) Meta

func (RC4) Meta() core.OpMeta

Meta returns the operation metadata.

func (RC4) Run

func (RC4) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the RC4 stream cipher (encryption and decryption are identical).

type RC4Drop

type RC4Drop struct{}

RC4Drop is RC4 with an initial portion of the keystream discarded.

func (RC4Drop) Args

func (RC4Drop) Args() []core.ArgDef

Args returns the argument definitions.

func (RC4Drop) Meta

func (RC4Drop) Meta() core.OpMeta

Meta returns the operation metadata.

func (RC4Drop) Run

func (RC4Drop) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs RC4-drop.

type RC6Decrypt

type RC6Decrypt struct{}

RC6Decrypt decrypts RC6 ciphertext.

func (RC6Decrypt) Args

func (RC6Decrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (RC6Decrypt) Meta

func (RC6Decrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (RC6Decrypt) Run

func (RC6Decrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type RC6Encrypt

type RC6Encrypt struct{}

RC6Encrypt encrypts input with the RC6 block cipher.

func (RC6Encrypt) Args

func (RC6Encrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (RC6Encrypt) Meta

func (RC6Encrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (RC6Encrypt) Run

func (RC6Encrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type RIPEMD

type RIPEMD struct{}

RIPEMD computes the RIPEMD hash at one of the four output sizes.

func (RIPEMD) Args

func (RIPEMD) Args() []core.ArgDef

Args returns the argument definitions.

func (RIPEMD) Meta

func (RIPEMD) Meta() core.OpMeta

Meta returns the operation metadata.

func (RIPEMD) Run

func (RIPEMD) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the RIPEMD hash at the selected size.

type ROR13

type ROR13 struct{}

ROR13 computes the ROR13 hash used in Windows API-name hashing techniques.

func (ROR13) Args

func (ROR13) Args() []core.ArgDef

Args returns the argument definitions.

func (ROR13) Meta

func (ROR13) Meta() core.OpMeta

Meta returns the operation metadata.

func (ROR13) Run

func (ROR13) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the hash.

type ROT13

type ROT13 struct{}

ROT13 is a Caesar substitution cipher rotating alphabet characters (and optionally digits) by a configurable amount.

func (ROT13) Args

func (ROT13) Args() []core.ArgDef

Args returns the argument definitions.

func (ROT13) Meta

func (ROT13) Meta() core.OpMeta

Meta returns the operation metadata.

func (ROT13) Run

func (ROT13) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the rotation.

type ROT13BruteForce

type ROT13BruteForce struct{}

ROT13BruteForce tries every ROT13 rotation, optionally filtering by a crib.

func (ROT13BruteForce) Args

func (ROT13BruteForce) Args() []core.ArgDef

Args returns the argument definitions.

func (ROT13BruteForce) Meta

func (ROT13BruteForce) Meta() core.OpMeta

Meta returns the operation metadata.

func (ROT13BruteForce) Run

func (ROT13BruteForce) Run(in *core.Dish, args []any) (*core.Dish, error)

Run enumerates the rotations.

type ROT47

type ROT47 struct{}

ROT47 rotates printable ASCII characters from 33 ('!') to 126 ('~').

func (ROT47) Args

func (ROT47) Args() []core.ArgDef

Args returns the argument definitions.

func (ROT47) Meta

func (ROT47) Meta() core.OpMeta

Meta returns the operation metadata.

func (ROT47) Run

func (ROT47) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the rotation.

type ROT47BruteForce

type ROT47BruteForce struct{}

ROT47BruteForce tries every ROT47 rotation, optionally filtering by a crib.

func (ROT47BruteForce) Args

func (ROT47BruteForce) Args() []core.ArgDef

Args returns the argument definitions.

func (ROT47BruteForce) Meta

func (ROT47BruteForce) Meta() core.OpMeta

Meta returns the operation metadata.

func (ROT47BruteForce) Run

func (ROT47BruteForce) Run(in *core.Dish, args []any) (*core.Dish, error)

Run enumerates the rotations.

type ROT8000

type ROT8000 struct{}

ROT8000 is a Caesar cipher over the valid BMP code points, replacing each character with the one 0x8000 positions along the (compacted) alphabet.

func (ROT8000) Args

func (ROT8000) Args() []core.ArgDef

Args returns the argument definitions.

func (ROT8000) Meta

func (ROT8000) Meta() core.OpMeta

Meta returns the operation metadata.

func (ROT8000) Run

func (ROT8000) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the rotation.

type RSADecrypt

type RSADecrypt struct{}

RSADecrypt decrypts an RSA message with a PEM private key.

func (RSADecrypt) Args

func (RSADecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (RSADecrypt) Meta

func (RSADecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (RSADecrypt) Run

func (RSADecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts the input.

type RSAEncrypt

type RSAEncrypt struct{}

RSAEncrypt encrypts a message with a PEM RSA public key.

func (RSAEncrypt) Args

func (RSAEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (RSAEncrypt) Meta

func (RSAEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (RSAEncrypt) Run

func (RSAEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts the input.

type RSASign

type RSASign struct{}

RSASign signs a message with a PEM RSA private key.

func (RSASign) Args

func (RSASign) Args() []core.ArgDef

Args returns the argument definitions.

func (RSASign) Meta

func (RSASign) Meta() core.OpMeta

Meta returns the operation metadata.

func (RSASign) Run

func (RSASign) Run(in *core.Dish, args []any) (*core.Dish, error)

Run signs the input.

type RSAVerify

type RSAVerify struct{}

RSAVerify verifies a message against a signature and a PEM RSA public key.

func (RSAVerify) Args

func (RSAVerify) Args() []core.ArgDef

Args returns the argument definitions.

func (RSAVerify) Meta

func (RSAVerify) Meta() core.OpMeta

Meta returns the operation metadata.

func (RSAVerify) Run

func (RSAVerify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run verifies the input signature.

type Rabbit

type Rabbit struct{}

Rabbit is the RFC 4503 stream cipher.

func (Rabbit) Args

func (Rabbit) Args() []core.ArgDef

Args returns the argument definitions.

func (Rabbit) Meta

func (Rabbit) Meta() core.OpMeta

Meta returns the operation metadata.

func (Rabbit) Run

func (Rabbit) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption/decryption (Rabbit is symmetric).

type RailFenceDecode

type RailFenceDecode struct{}

RailFenceDecode decodes Rail Fence cipher text.

func (RailFenceDecode) Args

func (RailFenceDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (RailFenceDecode) Meta

func (RailFenceDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (RailFenceDecode) Run

func (RailFenceDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decoding.

type RailFenceEncode

type RailFenceEncode struct{}

RailFenceEncode encodes with the Rail Fence cipher.

func (RailFenceEncode) Args

func (RailFenceEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (RailFenceEncode) Meta

func (RailFenceEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (RailFenceEncode) Run

func (RailFenceEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encoding.

type RandomPrime

type RandomPrime struct{}

RandomPrime generates a probable prime of a given size.

func (RandomPrime) Args

func (RandomPrime) Args() []core.ArgDef

Args returns the size wanted, how thoroughly to test, and how to write the answer.

func (RandomPrime) Meta

func (RandomPrime) Meta() core.OpMeta

Meta returns the operation metadata.

func (RandomPrime) Run

func (RandomPrime) Run(in *core.Dish, args []any) (*core.Dish, error)

Run generates the prime.

type RandomizeColourPalette

type RandomizeColourPalette struct{}

RandomizeColourPalette recolours an image so that every distinct colour becomes a new one derived from a seed.

func (RandomizeColourPalette) Args

Args returns the seed; empty means a random one.

func (RandomizeColourPalette) Meta

Meta returns the operation metadata.

func (RandomizeColourPalette) Run

func (RandomizeColourPalette) Run(in *core.Dish, args []any) (*core.Dish, error)

Run recolours the image.

type RawDeflate

type RawDeflate struct{}

RawDeflate compresses the input into a raw DEFLATE stream.

func (RawDeflate) Args

func (RawDeflate) Args() []core.ArgDef

Args returns the argument definitions.

func (RawDeflate) Meta

func (RawDeflate) Meta() core.OpMeta

Meta returns the operation metadata.

func (RawDeflate) Run

func (RawDeflate) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compresses the input.

type RawInflate

type RawInflate struct{}

RawInflate reads a raw DEFLATE stream back into the bytes it was made from.

func (RawInflate) Args

func (RawInflate) Args() []core.ArgDef

Args returns the argument definitions.

func (RawInflate) Meta

func (RawInflate) Meta() core.OpMeta

Meta returns the operation metadata.

func (RawInflate) Run

func (RawInflate) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input. Only the start index has any bearing on the result: the other three size and grow the reader's working buffer, which does not change what it decodes.

type Register

type Register struct{}

Register extracts data from the input into registers that later steps can refer to.

func (Register) Args

func (Register) Args() []core.ArgDef

Args returns the extractor and its flags.

func (Register) Meta

func (Register) Meta() core.OpMeta

Meta returns the operation metadata.

func (Register) Run

func (Register) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through; outside a recipe there are no later steps to pass registers to.

func (Register) RunFlow

func (Register) RunFlow(state *core.FlowState) error

RunFlow extracts the capture groups and writes them into the arguments of every later step. The data itself is untouched.

type RegularExpression

type RegularExpression struct{}

RegularExpression highlights or lists the matches of a regular expression.

func (RegularExpression) Args

func (RegularExpression) Args() []core.ArgDef

Args returns the argument definitions. The first argument mirrors CyberChef's "Built in regexes" populate-option, which is ignored at run time; supply the pattern via the Regex argument.

func (RegularExpression) Meta

func (RegularExpression) Meta() core.OpMeta

Meta returns the operation metadata.

func (RegularExpression) Run

func (RegularExpression) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the regex.

type RemoveANSIEscapeCodes

type RemoveANSIEscapeCodes struct{}

RemoveANSIEscapeCodes strips ANSI terminal escape sequences.

func (RemoveANSIEscapeCodes) Args

Args returns the argument definitions.

func (RemoveANSIEscapeCodes) Meta

Meta returns the operation metadata.

func (RemoveANSIEscapeCodes) Run

func (RemoveANSIEscapeCodes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips ANSI codes.

type RemoveDiacritics

type RemoveDiacritics struct{}

RemoveDiacritics strips accents from characters.

func (RemoveDiacritics) Args

func (RemoveDiacritics) Args() []core.ArgDef

Args returns no arguments; the operation takes none.

func (RemoveDiacritics) Meta

func (RemoveDiacritics) Meta() core.OpMeta

Meta returns the operation metadata.

func (RemoveDiacritics) Run

func (RemoveDiacritics) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips the accents: decompose to NFD, then drop every combining diacritical mark (U+0300 to U+036F), as upstream does. A character whose accent is part of the letter itself rather than a combining mark (ø, đ, ß) has nothing to strip and survives.

type RemoveEXIF

type RemoveEXIF struct{}

RemoveEXIF removes EXIF metadata from a JPEG.

func (RemoveEXIF) Args

func (RemoveEXIF) Args() []core.ArgDef

Args returns the argument definitions.

func (RemoveEXIF) Meta

func (RemoveEXIF) Meta() core.OpMeta

Meta returns the operation metadata.

func (RemoveEXIF) Run

func (RemoveEXIF) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run removes EXIF data, or returns the input unchanged if none is found.

type RemoveLineNumbers

type RemoveLineNumbers struct{}

RemoveLineNumbers removes leading line numbers from each line.

func (RemoveLineNumbers) Args

func (RemoveLineNumbers) Args() []core.ArgDef

Args returns the argument definitions.

func (RemoveLineNumbers) Meta

func (RemoveLineNumbers) Meta() core.OpMeta

Meta returns the operation metadata.

func (RemoveLineNumbers) Run

func (RemoveLineNumbers) Run(in *core.Dish, args []any) (*core.Dish, error)

Run removes line numbers.

type RemoveNullBytes

type RemoveNullBytes struct{}

RemoveNullBytes strips all 0x00 bytes from the input.

func (RemoveNullBytes) Args

func (RemoveNullBytes) Args() []core.ArgDef

Args returns the argument definitions.

func (RemoveNullBytes) Meta

func (RemoveNullBytes) Meta() core.OpMeta

Meta returns the operation metadata.

func (RemoveNullBytes) Run

func (RemoveNullBytes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run removes null bytes.

type RemoveWhitespace

type RemoveWhitespace struct{}

RemoveWhitespace removes selected whitespace (and optionally full stops).

func (RemoveWhitespace) Args

func (RemoveWhitespace) Args() []core.ArgDef

Args returns the argument definitions.

func (RemoveWhitespace) Meta

func (RemoveWhitespace) Meta() core.OpMeta

Meta returns the operation metadata.

func (RemoveWhitespace) Run

func (RemoveWhitespace) Run(in *core.Dish, args []any) (*core.Dish, error)

Run removes the selected characters.

type RenderImage

type RenderImage struct{}

RenderImage validates that the input is an image and passes the bytes through. CyberChef renders the bytes as an <img> in the browser via presentType=html; cchef drops that browser-only presentation and instead offers an "Output" option: Raw bytes (the default, save with -o or a pipe), a base64 data-URI, or an inline terminal preview.

func (RenderImage) Args

func (RenderImage) Args() []core.ArgDef

Args returns the argument definitions.

func (RenderImage) Meta

func (RenderImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (RenderImage) Run

func (RenderImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run validates the image and passes its bytes through.

type RenderMarkdown

type RenderMarkdown struct{}

RenderMarkdown renders Markdown input as HTML. Ported from CyberChef RenderMarkdown.mjs, which uses markdown-it (with raw HTML disabled) plus highlight.js for fenced code blocks, wrapping the result in a div. cchef reimplements it over goldmark.

Reduced fidelity, by design: goldmark is not markdown-it. The common Markdown surface (headings, emphasis, lists, links, code, blockquotes, linkify) matches byte-for-byte, but two areas differ and are not ported: syntax highlighting of fenced code blocks (CyberChef colours them with highlight.js; cchef emits the escaped code) and block-level raw HTML (markdown-it escapes it as text, cchef escapes it without the surrounding paragraph).

func (RenderMarkdown) Args

func (RenderMarkdown) Args() []core.ArgDef

Args returns the argument definitions.

func (RenderMarkdown) Meta

func (RenderMarkdown) Meta() core.OpMeta

Meta returns the operation metadata.

func (RenderMarkdown) Run

func (RenderMarkdown) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the Markdown input.

type RenderPDF

type RenderPDF struct{}

RenderPDF validates that the input is a PDF and passes the bytes through. Ported from CyberChef RenderPDF.mjs, whose browser <iframe> PDF preview is dropped; cchef offers Raw or base64 data-URI output.

func (RenderPDF) Args

func (RenderPDF) Args() []core.ArgDef

Args returns the argument definitions.

func (RenderPDF) Meta

func (RenderPDF) Meta() core.OpMeta

Meta returns the operation metadata.

func (RenderPDF) Run

func (RenderPDF) Run(in *core.Dish, args []any) (*core.Dish, error)

Run validates the PDF and passes its bytes through.

type ResizeImage

type ResizeImage struct{}

ResizeImage resizes an image.

func (ResizeImage) Args

func (ResizeImage) Args() []core.ArgDef

Args returns the argument definitions.

func (ResizeImage) Meta

func (ResizeImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (ResizeImage) Run

func (ResizeImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run resizes the image.

type Return

type Return struct{}

Return ends a recipe early.

func (Return) Args

func (Return) Args() []core.ArgDef

Args returns no arguments; the operation takes none.

func (Return) Meta

func (Return) Meta() core.OpMeta

Meta returns the operation metadata.

func (Return) Run

func (Return) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through.

func (Return) RunFlow

func (Return) RunFlow(state *core.FlowState) error

RunFlow moves past the last step, so nothing after this runs.

type Reverse

type Reverse struct{}

Reverse reverses the input by byte, character (UTF-8 rune), or line.

func (Reverse) Args

func (Reverse) Args() []core.ArgDef

Args returns the argument definitions. Default scope is Character.

func (Reverse) Meta

func (Reverse) Meta() core.OpMeta

Meta returns the operation metadata.

func (Reverse) Run

func (Reverse) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reverses the input.

type RisonDecode

type RisonDecode struct{}

RisonDecode parses a Rison string into a JSON value.

func (RisonDecode) Args

func (RisonDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (RisonDecode) Meta

func (RisonDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (RisonDecode) Run

func (RisonDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the Rison input into a JSON value (rendered as 4-space JSON).

type RisonEncode

type RisonEncode struct{}

RisonEncode serialises a JSON value into Rison, a compact URI-friendly format.

This is an in-repo port of the `rison` npm library CyberChef wraps (a pure JS encoder/parser), reusing cchef's JSON dish model. It reproduces the library's behaviour, including object-key sorting on encode and the replace-first-only quirk in its URI quoting.

func (RisonEncode) Args

func (RisonEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (RisonEncode) Meta

func (RisonEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (RisonEncode) Run

func (RisonEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the JSON input as Rison.

type RotateImage

type RotateImage struct{}

RotateImage rotates an image by a number of degrees. Multiples of 90 degrees use Jimp's exact matrix rotation (pixel-identical); other angles use an approximate rotation with the same output canvas size (Jimp upscales first, so pixels differ — reduced fidelity, documented).

func (RotateImage) Args

func (RotateImage) Args() []core.ArgDef

Args returns the argument definitions.

func (RotateImage) Meta

func (RotateImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (RotateImage) Run

func (RotateImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run rotates the image.

type RotateLeft

type RotateLeft struct{}

RotateLeft rotates the bits of each byte left, optionally carrying overflow bits into the next byte.

func (RotateLeft) Args

func (RotateLeft) Args() []core.ArgDef

Args returns the argument definitions.

func (RotateLeft) Meta

func (RotateLeft) Meta() core.OpMeta

Meta returns the operation metadata.

func (RotateLeft) Run

func (RotateLeft) Run(in *core.Dish, args []any) (*core.Dish, error)

Run rotates left.

type RotateRight

type RotateRight struct{}

RotateRight rotates the bits of each byte right, optionally carrying overflow bits into the next byte.

func (RotateRight) Args

func (RotateRight) Args() []core.ArgDef

Args returns the argument definitions.

func (RotateRight) Meta

func (RotateRight) Meta() core.OpMeta

Meta returns the operation metadata.

func (RotateRight) Run

func (RotateRight) Run(in *core.Dish, args []any) (*core.Dish, error)

Run rotates right.

type SHA0

type SHA0 struct{}

SHA0 computes the (withdrawn 1993) SHA-0 hash.

func (SHA0) Args

func (SHA0) Args() []core.ArgDef

Args returns the argument definitions.

func (SHA0) Meta

func (SHA0) Meta() core.OpMeta

Meta returns the operation metadata.

func (SHA0) Run

func (SHA0) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the SHA-0 hash.

type SHA1

type SHA1 struct{}

SHA1 computes the SHA-1 hash over a configurable number of rounds.

func (SHA1) Args

func (SHA1) Args() []core.ArgDef

Args returns the argument definitions.

func (SHA1) Meta

func (SHA1) Meta() core.OpMeta

Meta returns the operation metadata.

func (SHA1) Run

func (SHA1) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the digest.

type SHA2

type SHA2 struct{}

SHA2 computes a SHA-2 digest at a chosen size and round count.

func (SHA2) Args

func (SHA2) Args() []core.ArgDef

Args returns the argument definitions. Both round counts are named "Rounds" upstream and are told apart by position, so each gets an explicit flag name.

func (SHA2) Meta

func (SHA2) Meta() core.OpMeta

Meta returns the operation metadata.

func (SHA2) Run

func (SHA2) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the digest.

type SHA3

type SHA3 struct{}

SHA3 computes a SHA-3 digest at the selected output size.

func (SHA3) Args

func (SHA3) Args() []core.ArgDef

Args returns the argument definitions.

func (SHA3) Meta

func (SHA3) Meta() core.OpMeta

Meta returns the operation metadata.

func (SHA3) Run

func (SHA3) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the digest.

type SIGABA

type SIGABA struct{}

SIGABA emulates the WW2 SIGABA (ECM Mark II) cipher machine.

func (SIGABA) Args

func (SIGABA) Args() []core.ArgDef

Args returns the argument definitions (5 cipher, 5 control, 5 index rotors, then the mode) in the same order as CyberChef's SIGABA.mjs.

func (SIGABA) Meta

func (SIGABA) Meta() core.OpMeta

Meta returns the operation metadata.

func (SIGABA) Run

func (SIGABA) Run(in *core.Dish, args []any) (*core.Dish, error)

Run enciphers or deciphers with SIGABA.

type SM2Decrypt

type SM2Decrypt struct{}

SM2Decrypt decrypts an SM2-encrypted message.

func (SM2Decrypt) Args

func (SM2Decrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (SM2Decrypt) Meta

func (SM2Decrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (SM2Decrypt) Run

func (SM2Decrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts the hex-encoded input with the given private key.

type SM2Encrypt

type SM2Encrypt struct{}

SM2Encrypt encrypts a message with the SM2 public-key standard.

func (SM2Encrypt) Args

func (SM2Encrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (SM2Encrypt) Meta

func (SM2Encrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (SM2Encrypt) Run

func (SM2Encrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts the input bytes for the given public key, emitting hex.

type SM3

type SM3 struct{}

SM3 computes the SM3 cryptographic hash.

func (SM3) Args

func (SM3) Args() []core.ArgDef

Args returns the argument definitions.

func (SM3) Meta

func (SM3) Meta() core.OpMeta

Meta returns the operation metadata.

func (SM3) Run

func (SM3) Run(in *core.Dish, args []any) (*core.Dish, error)

Run hashes the input with the given output length (bits) and round count.

type SM4Decrypt

type SM4Decrypt struct{}

SM4Decrypt decrypts with the SM4 block cipher.

func (SM4Decrypt) Args

func (SM4Decrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (SM4Decrypt) Meta

func (SM4Decrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (SM4Decrypt) Run

func (SM4Decrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts with SM4.

type SM4Encrypt

type SM4Encrypt struct{}

SM4Encrypt encrypts with the SM4 block cipher.

func (SM4Encrypt) Args

func (SM4Encrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (SM4Encrypt) Meta

func (SM4Encrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (SM4Encrypt) Run

func (SM4Encrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts with SM4.

type SQLBeautify

type SQLBeautify struct{}

SQLBeautify indents and prettifies SQL. Ported from CyberChef SQLBeautify.mjs, which wraps the sql-formatter npm library with a fixed configuration (MySQL dialect, "standard" indent style, keywordCase "preserve") and a bind-variable placeholder shuffle. cchef reimplements sql-formatter's tokenizer and layout formatter (the WS/Layout/Indentation engine follows sql-formatter's); keyword categories that drive the layout are curated for the MySQL dialect.

func (SQLBeautify) Args

func (SQLBeautify) Args() []core.ArgDef

Args returns the argument definitions.

func (SQLBeautify) Meta

func (SQLBeautify) Meta() core.OpMeta

Meta returns the operation metadata.

func (SQLBeautify) Run

func (SQLBeautify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run formats the SQL input.

type SQLMinify

type SQLMinify struct{}

SQLMinify struct.

func (SQLMinify) Args

func (SQLMinify) Args() []core.ArgDef

Args returns the argument definitions.

func (SQLMinify) Meta

func (SQLMinify) Meta() core.OpMeta

Meta returns the operation metadata.

func (SQLMinify) Run

func (SQLMinify) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run minifies the SQL input. Ported from vkbeautify.sqlmin: collapse every whitespace run to a single space, then drop the space before the first "(" and the first ")" (the library's replaces for those two are not global).

type SSDEEP

type SSDEEP struct{}

SSDEEP computes an SSDEEP fuzzy hash. Ported from CyberChef SSDEEP.mjs (which wraps the non-standard ssdeep.js package); the algorithm is reimplemented from that package to match its output.

func (SSDEEP) Args

func (SSDEEP) Args() []core.ArgDef

Args returns the argument definitions.

func (SSDEEP) Meta

func (SSDEEP) Meta() core.OpMeta

Meta returns the operation metadata.

func (SSDEEP) Run

func (SSDEEP) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the SSDEEP digest.

type SUB

type SUB struct{}

SUB subtracts a repeating key from each byte, mod 256.

func (SUB) Args

func (SUB) Args() []core.ArgDef

Args returns the argument definitions.

func (SUB) Meta

func (SUB) Meta() core.OpMeta

Meta returns the operation metadata.

func (SUB) Run

func (SUB) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the SUB.

type Salsa20

type Salsa20 struct{}

Salsa20 is the Salsa20 stream cipher (8-byte nonce).

func (Salsa20) Args

func (Salsa20) Args() []core.ArgDef

Args returns the argument definitions.

func (Salsa20) Meta

func (Salsa20) Meta() core.OpMeta

Meta returns the operation metadata.

func (Salsa20) Run

func (Salsa20) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the Salsa20 stream cipher.

type ScanForEmbeddedFiles

type ScanForEmbeddedFiles struct{}

ScanForEmbeddedFiles looks for file signatures at every offset of the input.

func (ScanForEmbeddedFiles) Args

func (ScanForEmbeddedFiles) Args() []core.ArgDef

Args returns one boolean per signature category, everything on except Miscellaneous, whose false positives drown the rest.

func (ScanForEmbeddedFiles) Meta

Meta returns the operation metadata.

func (ScanForEmbeddedFiles) Run

func (ScanForEmbeddedFiles) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reports every signature match in the input.

type ScatterChart

type ScatterChart struct{}

ScatterChart plots two-variable data as points. Ported from CyberChef's Scatter chart, which builds the SVG with d3 and nodom; cchef reproduces d3's scales and axis markup directly. See svgbuild.go for the places the serialisation deliberately differs.

func (ScatterChart) Args

func (ScatterChart) Args() []core.ArgDef

Args returns the argument definitions.

func (ScatterChart) Meta

func (ScatterChart) Meta() core.OpMeta

Meta returns the operation metadata.

func (ScatterChart) Run

func (ScatterChart) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the scatter chart.

type Scrypt

type Scrypt struct{}

Scrypt derives a key from the input password using the scrypt PBKDF.

func (Scrypt) Args

func (Scrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (Scrypt) Meta

func (Scrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (Scrypt) Run

func (Scrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run derives the scrypt key. The parameter validation mirrors scryptsy; the derivation itself uses the canonical golang.org/x/crypto/scrypt (an RFC 7914 implementation), so outputs match byte-for-byte on all standard parameters. cchef diverges from scryptsy only at RFC-forbidden degenerate parameters (e.g. N=1 or p=0, which scryptsy still computes but the standard scrypt rejects).

type SeriesChart

type SeriesChart struct{}

SeriesChart draws one line graph per named series over a shared x axis.

func (SeriesChart) Args

func (SeriesChart) Args() []core.ArgDef

Args returns the argument definitions.

func (SeriesChart) Meta

func (SeriesChart) Meta() core.OpMeta

Meta returns the operation metadata.

func (SeriesChart) Run

func (SeriesChart) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the series chart.

type SetDifference

type SetDifference struct{}

SetDifference calculates the relative complement of two sets.

func (SetDifference) Args

func (SetDifference) Args() []core.ArgDef

Args returns the argument definitions.

func (SetDifference) Meta

func (SetDifference) Meta() core.OpMeta

Meta returns the operation metadata.

func (SetDifference) Run

func (SetDifference) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the relative complement: items of the first set not in the second, deduplicated (CyberChef PR #2286).

type SetIntersection

type SetIntersection struct{}

SetIntersection calculates the intersection of two sets.

func (SetIntersection) Args

func (SetIntersection) Args() []core.ArgDef

Args returns the argument definitions.

func (SetIntersection) Meta

func (SetIntersection) Meta() core.OpMeta

Meta returns the operation metadata.

func (SetIntersection) Run

func (SetIntersection) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the intersection: items of the first set that are also in the second, deduplicated (CyberChef PR #2286).

type SetUnion

type SetUnion struct{}

SetUnion calculates the union of two sets.

func (SetUnion) Args

func (SetUnion) Args() []core.ArgDef

Args returns the argument definitions.

func (SetUnion) Meta

func (SetUnion) Meta() core.OpMeta

Meta returns the operation metadata.

func (SetUnion) Run

func (SetUnion) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the union. Ported from CyberChef SetUnion.mjs (uses a JS object as the hash set, so its key-ordering quirk is reproduced).

type Shake

type Shake struct{}

Shake is the SHAKE extendable-output function (XOF) of SHA-3, producing a variable-length digest. Ported from CyberChef's Shake: the Size argument is in bits and the output is floor(size/8) bytes of SHAKE output, as hex.

func (Shake) Args

func (Shake) Args() []core.ArgDef

Args returns the argument definitions.

func (Shake) Meta

func (Shake) Meta() core.OpMeta

Meta returns the operation metadata.

func (Shake) Run

func (Shake) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the SHAKE digest of the requested size.

type SharpenImage

type SharpenImage struct{}

SharpenImage sharpens an image with an unsharp mask. Ported from CyberChef's Sharpen Image, which builds the mask from a Gaussian blur (Jimp's gaussian) and merges it back weighted by a luminance threshold.

func (SharpenImage) Args

func (SharpenImage) Args() []core.ArgDef

Args returns the argument definitions.

func (SharpenImage) Meta

func (SharpenImage) Meta() core.OpMeta

Meta returns the operation metadata.

func (SharpenImage) Run

func (SharpenImage) Run(in *core.Dish, args []any) (*core.Dish, error)

Run sharpens the image.

type ShowBase64Offsets

type ShowBase64Offsets struct{}

ShowBase64Offsets shows the three possible Base64 encodings of a string depending on its byte offset within a larger block.

func (ShowBase64Offsets) Args

func (ShowBase64Offsets) Args() []core.ArgDef

Args returns the argument definitions.

func (ShowBase64Offsets) Meta

func (ShowBase64Offsets) Meta() core.OpMeta

Meta returns the operation metadata.

func (ShowBase64Offsets) Run

func (ShowBase64Offsets) Run(in *core.Dish, args []any) (*core.Dish, error)

Run builds the offsets view.

type ShowOnMap

type ShowOnMap struct{}

ShowOnMap converts coordinates to a latitude/longitude pair for display on a map.

func (ShowOnMap) Args

func (ShowOnMap) Args() []core.ArgDef

Args returns the argument definitions.

func (ShowOnMap) Meta

func (ShowOnMap) Meta() core.OpMeta

Meta returns the operation metadata.

func (ShowOnMap) Run

func (ShowOnMap) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the coordinates.

type Shuffle

type Shuffle struct{}

Shuffle randomly reorders the sections of the input.

func (Shuffle) Args

func (Shuffle) Args() []core.ArgDef

Args returns the argument definitions.

func (Shuffle) Meta

func (Shuffle) Meta() core.OpMeta

Meta returns the operation metadata.

func (Shuffle) Run

func (Shuffle) Run(in *core.Dish, args []any) (*core.Dish, error)

Run shuffles the input.

type Sleep

type Sleep struct{}

Sleep delays for the given number of milliseconds, then passes the input on.

func (Sleep) Args

func (Sleep) Args() []core.ArgDef

Args returns the argument definitions.

func (Sleep) Meta

func (Sleep) Meta() core.OpMeta

Meta returns the operation metadata.

func (Sleep) Run

func (Sleep) Run(in *core.Dish, args []any) (*core.Dish, error)

Run sleeps then returns the input.

type Snefru

type Snefru struct{}

Snefru computes the Snefru hash at the given output length and round count.

func (Snefru) Args

func (Snefru) Args() []core.ArgDef

Args returns the argument definitions.

func (Snefru) Meta

func (Snefru) Meta() core.OpMeta

Meta returns the operation metadata.

func (Snefru) Run

func (Snefru) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the Snefru hash.

type Sort

type Sort struct{}

Sort orders the sections of the input.

func (Sort) Args

func (Sort) Args() []core.ArgDef

Args returns the argument definitions.

func (Sort) Meta

func (Sort) Meta() core.OpMeta

Meta returns the operation metadata.

func (Sort) Run

func (Sort) Run(in *core.Dish, args []any) (*core.Dish, error)

Run sorts the sections.

type Split

type Split struct{}

Split splits the input on one delimiter and rejoins with another.

func (Split) Args

func (Split) Args() []core.ArgDef

Args returns the argument definitions. The default join delimiter is written "\n" and decodes to a newline, matching CyberChef's "Line feed" preset.

func (Split) Meta

func (Split) Meta() core.OpMeta

Meta returns the operation metadata.

func (Split) Run

func (Split) Run(in *core.Dish, args []any) (*core.Dish, error)

Run splits then joins. Both delimiters are editableOption arguments in CyberChef, so their escape sequences are decoded before use.

type SplitColourChannels

type SplitColourChannels struct{}

SplitColourChannels separates an image into its red, green and blue channels. Alpha is kept and every channel is written as PNG regardless of the input format, as CyberChef does. The three images are pixel-identical to CyberChef.

func (SplitColourChannels) Args

func (SplitColourChannels) Args() []core.ArgDef

Args returns the argument definitions.

func (SplitColourChannels) Meta

Meta returns the operation metadata.

func (SplitColourChannels) Run

func (SplitColourChannels) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run splits the image into one file per colour channel.

type StandardDeviation

type StandardDeviation struct{}

StandardDeviation computes the standard deviation of a list of numbers.

func (StandardDeviation) Args

func (StandardDeviation) Args() []core.ArgDef

Args returns the argument definitions.

func (StandardDeviation) Meta

func (StandardDeviation) Meta() core.OpMeta

Meta returns the operation metadata.

func (StandardDeviation) Run

func (StandardDeviation) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type Streebog

type Streebog struct{}

Streebog computes the GOST R 34.11-2012 "Streebog" hash. Ported from CyberChef's Streebog operation, which wraps the same GOST digest engine as GOST Hash (see gosthash.go's gostDigest2012).

func (Streebog) Args

func (Streebog) Args() []core.ArgDef

Args returns the argument definitions.

func (Streebog) Meta

func (Streebog) Meta() core.OpMeta

Meta returns the operation metadata.

func (Streebog) Run

func (Streebog) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the Streebog digest.

type Strings

type Strings struct{}

Strings pulls the runs of readable characters out of the input.

func (Strings) Args

func (Strings) Args() []core.ArgDef

Args returns the argument definitions.

func (Strings) Meta

func (Strings) Meta() core.OpMeta

Meta returns the operation metadata.

func (Strings) Run

func (Strings) Run(in *core.Dish, args []any) (*core.Dish, error)

Run finds the runs.

type StripHTMLTags

type StripHTMLTags struct{}

StripHTMLTags struct.

func (StripHTMLTags) Args

func (StripHTMLTags) Args() []core.ArgDef

Args returns the argument definitions.

func (StripHTMLTags) Meta

func (StripHTMLTags) Meta() core.OpMeta

Meta returns the operation metadata.

func (StripHTMLTags) Run

func (StripHTMLTags) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips HTML tags and optionally cleans up whitespace.

type StripHTTPHeaders

type StripHTTPHeaders struct{}

StripHTTPHeaders removes the header block from an HTTP request or response.

func (StripHTTPHeaders) Args

func (StripHTTPHeaders) Args() []core.ArgDef

Args returns the argument definitions.

func (StripHTTPHeaders) Meta

func (StripHTTPHeaders) Meta() core.OpMeta

Meta returns the operation metadata.

func (StripHTTPHeaders) Run

func (StripHTTPHeaders) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips the headers.

type StripIPv4Header

type StripIPv4Header struct{}

StripIPv4Header removes the IPv4 header, leaving the payload.

func (StripIPv4Header) Args

func (StripIPv4Header) Args() []core.ArgDef

Args returns the argument definitions.

func (StripIPv4Header) Meta

func (StripIPv4Header) Meta() core.OpMeta

Meta returns the operation metadata.

func (StripIPv4Header) Run

func (StripIPv4Header) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips the header.

type StripTCPHeader

type StripTCPHeader struct{}

StripTCPHeader removes the TCP header, leaving the payload.

func (StripTCPHeader) Args

func (StripTCPHeader) Args() []core.ArgDef

Args returns the argument definitions.

func (StripTCPHeader) Meta

func (StripTCPHeader) Meta() core.OpMeta

Meta returns the operation metadata.

func (StripTCPHeader) Run

func (StripTCPHeader) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips the header.

type StripUDPHeader

type StripUDPHeader struct{}

StripUDPHeader removes the 8-byte UDP header, leaving the payload.

func (StripUDPHeader) Args

func (StripUDPHeader) Args() []core.ArgDef

Args returns the argument definitions.

func (StripUDPHeader) Meta

func (StripUDPHeader) Meta() core.OpMeta

Meta returns the operation metadata.

func (StripUDPHeader) Run

func (StripUDPHeader) Run(in *core.Dish, args []any) (*core.Dish, error)

Run strips the header.

type Subsection

type Subsection struct{}

Subsection runs the rest of the recipe over only the parts of the data that match a pattern.

func (Subsection) Args

func (Subsection) Args() []core.ArgDef

Args returns the pattern, its flags, and whether a failing section stops the recipe.

func (Subsection) Meta

func (Subsection) Meta() core.OpMeta

Meta returns the operation metadata.

func (Subsection) Run

func (Subsection) Run(in *core.Dish, args []any) (*core.Dish, error)

Run passes the data through; outside a recipe there are no steps to run over the matched sections.

func (Subsection) RunFlow

func (Subsection) RunFlow(state *core.FlowState) error

RunFlow runs the steps below over each matching section, splicing the results back between the parts that did not match.

type Substitute

type Substitute struct{}

Substitute is a byte-substitution cipher.

func (Substitute) Args

func (Substitute) Args() []core.ArgDef

Args returns the argument definitions.

func (Substitute) Meta

func (Substitute) Meta() core.OpMeta

Meta returns the operation metadata.

func (Substitute) Run

func (Substitute) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the substitution.

type Subtract

type Subtract struct{}

Subtract subtracts a list of numbers.

func (Subtract) Args

func (Subtract) Args() []core.ArgDef

Args returns the argument definitions.

func (Subtract) Meta

func (Subtract) Meta() core.OpMeta

Meta returns the operation metadata.

func (Subtract) Run

func (Subtract) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type Sum

type Sum struct{}

Sum adds a list of numbers.

func (Sum) Args

func (Sum) Args() []core.ArgDef

Args returns the argument definitions.

func (Sum) Meta

func (Sum) Meta() core.OpMeta

Meta returns the operation metadata.

func (Sum) Run

func (Sum) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the result.

type SwapCase

type SwapCase struct{}

SwapCase swaps the case of each character.

func (SwapCase) Args

func (SwapCase) Args() []core.ArgDef

Args returns the argument definitions.

func (SwapCase) Meta

func (SwapCase) Meta() core.OpMeta

Meta returns the operation metadata.

func (SwapCase) Run

func (SwapCase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run swaps case.

type SwapEndianness

type SwapEndianness struct{}

SwapEndianness reverses the byte order within fixed-length words.

func (SwapEndianness) Args

func (SwapEndianness) Args() []core.ArgDef

Args returns the argument definitions.

func (SwapEndianness) Meta

func (SwapEndianness) Meta() core.OpMeta

Meta returns the operation metadata.

func (SwapEndianness) Run

func (SwapEndianness) Run(in *core.Dish, args []any) (*core.Dish, error)

Run swaps endianness.

type SymmetricDifference

type SymmetricDifference struct{}

SymmetricDifference calculates the symmetric difference of two sets.

func (SymmetricDifference) Args

func (SymmetricDifference) Args() []core.ArgDef

Args returns the argument definitions.

func (SymmetricDifference) Meta

Meta returns the operation metadata.

func (SymmetricDifference) Run

func (SymmetricDifference) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the symmetric difference (items in exactly one set). It preserves duplicates within each side.

type SyntaxHighlighter

type SyntaxHighlighter struct{}

SyntaxHighlighter adds syntax highlighting to a range of source-code languages, emitting HTML spans that carry hljs-* CSS classes so the output can be styled with a highlight.js theme. The highlighting comes from chroma (github.com/alecthomas/chroma), whose token types are mapped onto the hljs-* class vocabulary; token boundaries and language auto-detection therefore differ from highlight.js.

func (SyntaxHighlighter) Args

func (SyntaxHighlighter) Args() []core.ArgDef

Args returns the argument definitions. "Language" is a free-form language name (a chroma lexer name or alias, matched case-insensitively) or "auto detect". CyberChef offers highlight.js's language list here; chroma's differs, so the argument takes any name rather than a fixed set of choices.

func (SyntaxHighlighter) Meta

func (SyntaxHighlighter) Meta() core.OpMeta

Meta returns the operation metadata.

func (SyntaxHighlighter) Run

func (SyntaxHighlighter) Run(in *core.Dish, args []any) (*core.Dish, error)

Run highlights the input in the requested language.

type TCPIPChecksum

type TCPIPChecksum struct{}

TCPIPChecksum computes the 16-bit one's-complement Internet checksum (RFC 1071) over the raw input bytes. Ported from CyberChef's TCPIPChecksum; the core sum is the shared tcpipChecksum helper (also used by the IPv4 header parser).

func (TCPIPChecksum) Args

func (TCPIPChecksum) Args() []core.ArgDef

Args returns the argument definitions.

func (TCPIPChecksum) Meta

func (TCPIPChecksum) Meta() core.OpMeta

Meta returns the operation metadata.

func (TCPIPChecksum) Run

func (TCPIPChecksum) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run computes the checksum.

type TEADecrypt

type TEADecrypt struct{}

TEADecrypt decrypts with the TEA block cipher.

func (TEADecrypt) Args

func (TEADecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (TEADecrypt) Meta

func (TEADecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (TEADecrypt) Run

func (TEADecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts with TEA.

type TEAEncrypt

type TEAEncrypt struct{}

TEAEncrypt encrypts with the TEA block cipher.

func (TEAEncrypt) Args

func (TEAEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (TEAEncrypt) Meta

func (TEAEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (TEAEncrypt) Run

func (TEAEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts with TEA.

type Tail

type Tail struct{}

Tail keeps the last N sections of the input.

func (Tail) Args

func (Tail) Args() []core.ArgDef

Args returns the argument definitions.

func (Tail) Meta

func (Tail) Meta() core.OpMeta

Meta returns the operation metadata.

func (Tail) Run

func (Tail) Run(in *core.Dish, args []any) (*core.Dish, error)

Run keeps the last sections.

type TakeBytes

type TakeBytes struct{}

TakeBytes keeps only a range of bytes from the input.

func (TakeBytes) Args

func (TakeBytes) Args() []core.ArgDef

Args returns the argument definitions.

func (TakeBytes) Meta

func (TakeBytes) Meta() core.OpMeta

Meta returns the operation metadata.

func (TakeBytes) Run

func (TakeBytes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run takes the byte range.

type TakeNthBytes

type TakeNthBytes struct{}

TakeNthBytes keeps every nth byte.

func (TakeNthBytes) Args

func (TakeNthBytes) Args() []core.ArgDef

Args returns the argument definitions.

func (TakeNthBytes) Meta

func (TakeNthBytes) Meta() core.OpMeta

Meta returns the operation metadata.

func (TakeNthBytes) Run

func (TakeNthBytes) Run(in *core.Dish, args []any) (*core.Dish, error)

Run keeps every nth byte.

type Tar

type Tar struct{}

Tar packs the input into a tarball under one name.

func (Tar) Args

func (Tar) Args() []core.ArgDef

Args returns the argument definitions.

func (Tar) Meta

func (Tar) Meta() core.OpMeta

Meta returns the operation metadata.

func (Tar) Run

func (Tar) Run(in *core.Dish, args []any) (*core.Dish, error)

Run packs the input.

type Template

type Template struct{}

Template renders a Handlebars template against JSON input.

func (Template) Args

func (Template) Args() []core.ArgDef

Args returns the argument definitions.

func (Template) Meta

func (Template) Meta() core.OpMeta

Meta returns the operation metadata.

func (Template) Run

func (Template) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the template.

type TextEncodingBruteForce

type TextEncodingBruteForce struct{}

TextEncodingBruteForce enumerates every supported text encoding for the input.

func (TextEncodingBruteForce) Args

Args returns the argument definitions.

func (TextEncodingBruteForce) Meta

Meta returns the operation metadata.

func (TextEncodingBruteForce) Run

func (TextEncodingBruteForce) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes or decodes the input in every charset, returning a JSON object mapping each charset name to its result (or "Could not decode." on error).

type TextIntegerConversion

type TextIntegerConversion struct{}

TextIntegerConversion converts between text and large integers (decimal or hexadecimal), interpreting text as a big-endian sequence of character codes.

func (TextIntegerConversion) Args

Args returns the argument definitions.

func (TextIntegerConversion) Meta

Meta returns the operation metadata.

func (TextIntegerConversion) Run

func (TextIntegerConversion) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the conversion.

type ToBCD

type ToBCD struct{}

ToBCD encodes a decimal number as Binary-Coded Decimal.

func (ToBCD) Args

func (ToBCD) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBCD) Meta

func (ToBCD) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBCD) Run

func (ToBCD) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase

type ToBase struct{}

ToBase converts an arbitrary-precision integer to a string in the given radix.

func (ToBase) Args

func (ToBase) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase) Meta

func (ToBase) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase) Run

func (ToBase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the input number to the target radix.

type ToBase32

type ToBase32 struct{}

ToBase32 encodes raw data as a Base32 string.

func (ToBase32) Args

func (ToBase32) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase32) Meta

func (ToBase32) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase32) Run

func (ToBase32) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase45

type ToBase45 struct{}

ToBase45 encodes raw bytes as a Base45 string.

func (ToBase45) Args

func (ToBase45) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase45) Meta

func (ToBase45) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase45) Run

func (ToBase45) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase58

type ToBase58 struct{}

ToBase58 encodes raw bytes as a Base58 string.

func (ToBase58) Args

func (ToBase58) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase58) Meta

func (ToBase58) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase58) Run

func (ToBase58) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase62

type ToBase62 struct{}

ToBase62 encodes raw bytes as a Base62 string.

func (ToBase62) Args

func (ToBase62) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase62) Meta

func (ToBase62) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase62) Run

func (ToBase62) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase64

type ToBase64 struct{}

ToBase64 encodes raw data into an ASCII Base64 string.

func (ToBase64) Args

func (ToBase64) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase64) Meta

func (ToBase64) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase64) Run

func (ToBase64) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase85

type ToBase85 struct{}

ToBase85 encodes raw bytes as a Base85 (Ascii85) string.

func (ToBase85) Args

func (ToBase85) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase85) Meta

func (ToBase85) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase85) Run

func (ToBase85) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBase92

type ToBase92 struct{}

ToBase92 encodes raw bytes as a Base92 string.

func (ToBase92) Args

func (ToBase92) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBase92) Meta

func (ToBase92) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBase92) Run

func (ToBase92) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBech32

type ToBech32 struct{}

ToBech32 encodes data as a Bech32/Bech32m string.

func (ToBech32) Args

func (ToBech32) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBech32) Meta

func (ToBech32) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBech32) Run

func (ToBech32) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input as Bech32/Bech32m.

type ToBinary

type ToBinary struct{}

ToBinary converts input bytes to a binary string.

func (ToBinary) Args

func (ToBinary) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBinary) Meta

func (ToBinary) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBinary) Run

func (ToBinary) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToBraille

type ToBraille struct{}

ToBraille converts text to six-dot braille symbols.

func (ToBraille) Args

func (ToBraille) Args() []core.ArgDef

Args returns the argument definitions.

func (ToBraille) Meta

func (ToBraille) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToBraille) Run

func (ToBraille) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts text to braille.

type ToCOBS

type ToCOBS struct{}

ToCOBS encodes bytes so that none of them is zero.

func (ToCOBS) Args

func (ToCOBS) Args() []core.ArgDef

Args returns no arguments; the operation takes none.

func (ToCOBS) Meta

func (ToCOBS) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToCOBS) Run

func (ToCOBS) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToCamelCase

type ToCamelCase struct{}

ToCamelCase struct.

func (ToCamelCase) Args

func (ToCamelCase) Args() []core.ArgDef

Args returns the argument definitions.

func (ToCamelCase) Meta

func (ToCamelCase) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToCamelCase) Run

func (ToCamelCase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the input to camel case. With "Attempt to be context aware", only identifier-like tokens are transformed.

type ToCaseInsensitiveRegex

type ToCaseInsensitiveRegex struct{}

ToCaseInsensitiveRegex rewrites a regex to match either case.

func (ToCaseInsensitiveRegex) Args

Args returns the argument definitions.

func (ToCaseInsensitiveRegex) Meta

Meta returns the operation metadata.

func (ToCaseInsensitiveRegex) Run

func (ToCaseInsensitiveRegex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run rewrites the regex.

type ToCharcode

type ToCharcode struct{}

ToCharcode converts input characters to their numeric code points.

func (ToCharcode) Args

func (ToCharcode) Args() []core.ArgDef

Args returns the argument definitions.

func (ToCharcode) Meta

func (ToCharcode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToCharcode) Run

func (ToCharcode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToDecimal

type ToDecimal struct{}

ToDecimal converts input bytes to a delimited list of decimal values.

func (ToDecimal) Args

func (ToDecimal) Args() []core.ArgDef

Args returns the argument definitions.

func (ToDecimal) Meta

func (ToDecimal) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToDecimal) Run

func (ToDecimal) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToFloat

type ToFloat struct{}

ToFloat converts IEEE754 bytes into their decimal representation.

func (ToFloat) Args

func (ToFloat) Args() []core.ArgDef

Args returns the argument definitions.

func (ToFloat) Meta

func (ToFloat) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToFloat) Run

func (ToFloat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type ToHTMLEntity

type ToHTMLEntity struct{}

ToHTMLEntity converts characters to HTML entities.

func (ToHTMLEntity) Args

func (ToHTMLEntity) Args() []core.ArgDef

Args returns the argument definitions.

func (ToHTMLEntity) Meta

func (ToHTMLEntity) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToHTMLEntity) Run

func (ToHTMLEntity) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input. Iterates code points (like Utils.strToCharcode, which merges surrogate pairs).

type ToHex

type ToHex struct{}

ToHex converts input bytes to hexadecimal separated by the chosen delimiter.

func (ToHex) Args

func (ToHex) Args() []core.ArgDef

Args returns the argument definitions.

func (ToHex) Meta

func (ToHex) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToHex) Run

func (ToHex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToHexContent

type ToHexContent struct{}

ToHexContent converts special characters in a string to SNORT hex-content notation (e.g. foo=bar -> foo|3d|bar).

func (ToHexContent) Args

func (ToHexContent) Args() []core.ArgDef

Args returns the argument definitions.

func (ToHexContent) Meta

func (ToHexContent) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToHexContent) Run

func (ToHexContent) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToHexdump

type ToHexdump struct{}

ToHexdump renders the input as a classic hexdump.

func (ToHexdump) Args

func (ToHexdump) Args() []core.ArgDef

Args returns the argument definitions.

func (ToHexdump) Meta

func (ToHexdump) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToHexdump) Run

func (ToHexdump) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the hexdump.

type ToKebabCase

type ToKebabCase struct{}

ToKebabCase struct.

func (ToKebabCase) Args

func (ToKebabCase) Args() []core.ArgDef

Args returns the argument definitions.

func (ToKebabCase) Meta

func (ToKebabCase) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToKebabCase) Run

func (ToKebabCase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the input to kebab case. With "Attempt to be context aware", only identifier-like tokens are transformed.

type ToLowerCase

type ToLowerCase struct{}

ToLowerCase converts every character in the input to lower case.

func (ToLowerCase) Args

func (ToLowerCase) Args() []core.ArgDef

Args returns the argument definitions.

func (ToLowerCase) Meta

func (ToLowerCase) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToLowerCase) Run

func (ToLowerCase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run lower-cases the input.

type ToMessagePack

type ToMessagePack struct{}

ToMessagePack serialises JSON into MessagePack.

CyberChef wraps the `notepack.io` library's encode; this is an in-repo port of its rules: shortest integer forms, the always-float-64 fallback for non-integers, JavaScript ECMAScript key ordering, and the (lossy) bit operations notepack uses to split integers beyond 2^32.

func (ToMessagePack) Args

func (ToMessagePack) Args() []core.ArgDef

Args returns the argument definitions.

func (ToMessagePack) Meta

func (ToMessagePack) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToMessagePack) Run

func (ToMessagePack) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run encodes JSON input into MessagePack bytes.

type ToModhex

type ToModhex struct{}

ToModhex converts input bytes to a modhex string.

func (ToModhex) Args

func (ToModhex) Args() []core.ArgDef

Args returns the argument definitions.

func (ToModhex) Meta

func (ToModhex) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToModhex) Run

func (ToModhex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToMorseCode

type ToMorseCode struct{}

ToMorseCode translates text into International Morse Code.

func (ToMorseCode) Args

func (ToMorseCode) Args() []core.ArgDef

Args returns the argument definitions.

func (ToMorseCode) Meta

func (ToMorseCode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToMorseCode) Run

func (ToMorseCode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToOctal

type ToOctal struct{}

ToOctal converts the input to octal bytes separated by the chosen delimiter.

func (ToOctal) Args

func (ToOctal) Args() []core.ArgDef

Args returns the argument definitions.

func (ToOctal) Meta

func (ToOctal) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToOctal) Run

func (ToOctal) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToPunycode

type ToPunycode struct{}

ToPunycode converts Unicode to Punycode.

CyberChef wraps punycode.js's encode (raw) and toASCII (IDN); this is a RFC 3492 implementation serving both.

func (ToPunycode) Args

func (ToPunycode) Args() []core.ArgDef

Args returns the argument definitions.

func (ToPunycode) Meta

func (ToPunycode) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToPunycode) Run

func (ToPunycode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input to Punycode.

type ToQuotedPrintable

type ToQuotedPrintable struct{}

ToQuotedPrintable encodes bytes as Quoted-Printable (RFC 2045).

func (ToQuotedPrintable) Args

func (ToQuotedPrintable) Args() []core.ArgDef

Args returns the argument definitions.

func (ToQuotedPrintable) Meta

func (ToQuotedPrintable) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToQuotedPrintable) Run

func (ToQuotedPrintable) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type ToSnakeCase

type ToSnakeCase struct{}

ToSnakeCase struct.

func (ToSnakeCase) Args

func (ToSnakeCase) Args() []core.ArgDef

Args returns the argument definitions.

func (ToSnakeCase) Meta

func (ToSnakeCase) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToSnakeCase) Run

func (ToSnakeCase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the input to snake case. With "Attempt to be context aware", only identifier-like tokens are transformed (via lodashcase.ReplaceVariableNames).

type ToTable

type ToTable struct{}

ToTable renders delimited data as an ASCII, HTML or Markdown table.

func (ToTable) Args

func (ToTable) Args() []core.ArgDef

Args returns the argument definitions.

func (ToTable) Meta

func (ToTable) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToTable) Run

func (ToTable) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the table.

type ToUNIXTimestamp

type ToUNIXTimestamp struct{}

ToUNIXTimestamp parses a datetime string into a UNIX timestamp.

func (ToUNIXTimestamp) Args

func (ToUNIXTimestamp) Args() []core.ArgDef

Args returns the argument definitions.

func (ToUNIXTimestamp) Meta

func (ToUNIXTimestamp) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToUNIXTimestamp) Run

func (ToUNIXTimestamp) Run(in *core.Dish, args []any) (*core.Dish, error)

Run parses the datetime.

type ToUpperCase

type ToUpperCase struct{}

ToUpperCase converts the input to upper case, optionally limited in scope.

func (ToUpperCase) Args

func (ToUpperCase) Args() []core.ArgDef

Args returns the argument definitions.

func (ToUpperCase) Meta

func (ToUpperCase) Meta() core.OpMeta

Meta returns the operation metadata.

func (ToUpperCase) Run

func (ToUpperCase) Run(in *core.Dish, args []any) (*core.Dish, error)

Run upper-cases the input within the chosen scope.

type TranslateDateTimeFormat

type TranslateDateTimeFormat struct{}

TranslateDateTimeFormat reformats a datetime string between formats/timezones.

func (TranslateDateTimeFormat) Args

Args returns the argument definitions.

func (TranslateDateTimeFormat) Meta

Meta returns the operation metadata.

func (TranslateDateTimeFormat) Run

func (TranslateDateTimeFormat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reformats the datetime.

type TripleDESDecrypt

type TripleDESDecrypt struct{}

TripleDESDecrypt decrypts Triple DES ciphertext.

func (TripleDESDecrypt) Args

func (TripleDESDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (TripleDESDecrypt) Meta

func (TripleDESDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (TripleDESDecrypt) Run

func (TripleDESDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the decryption.

type TripleDESEncrypt

type TripleDESEncrypt struct{}

TripleDESEncrypt encrypts input with the Triple DES block cipher.

func (TripleDESEncrypt) Args

func (TripleDESEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (TripleDESEncrypt) Meta

func (TripleDESEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (TripleDESEncrypt) Run

func (TripleDESEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption.

type TwofishDecrypt

type TwofishDecrypt struct{}

TwofishDecrypt decrypts with the Twofish block cipher.

func (TwofishDecrypt) Args

func (TwofishDecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (TwofishDecrypt) Meta

func (TwofishDecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (TwofishDecrypt) Run

func (TwofishDecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts with Twofish.

type TwofishEncrypt

type TwofishEncrypt struct{}

TwofishEncrypt encrypts with the Twofish block cipher.

func (TwofishEncrypt) Args

func (TwofishEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (TwofishEncrypt) Meta

func (TwofishEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (TwofishEncrypt) Run

func (TwofishEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts with Twofish.

type Typex

type Typex struct{}

Typex emulates the WW2 Typex machine.

func (Typex) Args

func (Typex) Args() []core.ArgDef

Args returns the argument definitions (five rotors of four args each, then the reflector, plugboard, keyboard mode and strict-output flag).

func (Typex) Meta

func (Typex) Meta() core.OpMeta

Meta returns the operation metadata.

func (Typex) Run

func (Typex) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the encryption/decryption.

type UNIXTimestampToWindowsFiletime

type UNIXTimestampToWindowsFiletime struct{}

UNIXTimestampToWindowsFiletime converts a UNIX timestamp to a Windows Filetime.

func (UNIXTimestampToWindowsFiletime) Args

Args returns the argument definitions.

func (UNIXTimestampToWindowsFiletime) Meta

Meta returns the operation metadata.

func (UNIXTimestampToWindowsFiletime) Run

func (UNIXTimestampToWindowsFiletime) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the timestamp.

type URLDecode

type URLDecode struct{}

URLDecode converts percent-encoded characters back to their raw values.

func (URLDecode) Args

func (URLDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (URLDecode) Meta

func (URLDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (URLDecode) Run

func (URLDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the input.

type URLEncode

type URLEncode struct{}

URLEncode percent-encodes problematic characters into a URL-safe form.

func (URLEncode) Args

func (URLEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (URLEncode) Meta

func (URLEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (URLEncode) Run

func (URLEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the input.

type UnescapeString

type UnescapeString struct{}

UnescapeString converts backslash escape sequences into their raw characters.

func (UnescapeString) Args

func (UnescapeString) Args() []core.ArgDef

Args returns the argument definitions.

func (UnescapeString) Meta

func (UnescapeString) Meta() core.OpMeta

Meta returns the operation metadata.

func (UnescapeString) Run

func (UnescapeString) Run(in *core.Dish, args []any) (*core.Dish, error)

Run unescapes the string.

type UnescapeUnicodeCharacters

type UnescapeUnicodeCharacters struct{}

UnescapeUnicodeCharacters converts unicode-escaped notation back to characters.

func (UnescapeUnicodeCharacters) Args

Args returns the argument definitions.

func (UnescapeUnicodeCharacters) Meta

Meta returns the operation metadata.

func (UnescapeUnicodeCharacters) Run

func (UnescapeUnicodeCharacters) Run(in *core.Dish, args []any) (*core.Dish, error)

Run unescapes the input. Only the U+ prefix admits 4-6 hex digits (for astral code points); the others are fixed at 4.

type UnicodeTextFormat

type UnicodeTextFormat struct{}

UnicodeTextFormat decorates text with Unicode combining characters.

func (UnicodeTextFormat) Args

func (UnicodeTextFormat) Args() []core.ArgDef

Args returns the two formats.

func (UnicodeTextFormat) Meta

func (UnicodeTextFormat) Meta() core.OpMeta

Meta returns the operation metadata.

func (UnicodeTextFormat) Run

func (UnicodeTextFormat) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decorates the input: after every character — a whole UTF-8 sequence, or a single byte where the bytes are not UTF-8 — the strikethrough mark and then the underline mark are appended, for whichever formats are asked for. Upstream appends them after every byte instead, splitting multi-byte characters apart, which is logged as a CyberChef bug.

type Unique

type Unique struct{}

Unique removes duplicate sections, optionally displaying occurrence counts.

func (Unique) Args

func (Unique) Args() []core.ArgDef

Args returns the argument definitions.

func (Unique) Meta

func (Unique) Meta() core.OpMeta

Meta returns the operation metadata.

func (Unique) Run

func (Unique) Run(in *core.Dish, args []any) (*core.Dish, error)

Run deduplicates the sections.

type Untar

type Untar struct{}

Untar unpacks a tarball into the files it holds.

func (Untar) Args

func (Untar) Args() []core.ArgDef

Args returns the argument definitions.

func (Untar) Meta

func (Untar) Meta() core.OpMeta

Meta returns the operation metadata.

func (Untar) Run

func (Untar) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run unpacks the archive.

type Unzip

type Unzip struct{}

Unzip reads the files out of a ZIP archive.

func (Unzip) Args

func (Unzip) Args() []core.ArgDef

Args returns the argument definitions.

func (Unzip) Meta

func (Unzip) Meta() core.OpMeta

Meta returns the operation metadata.

func (Unzip) Run

func (Unzip) Run(in *core.Dish, args []any) (*core.Dish, error)

Run reads the archive.

type VarIntDecode

type VarIntDecode struct{}

VarIntDecode decodes a Protobuf-style LEB128 variable-length integer.

func (VarIntDecode) Args

func (VarIntDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (VarIntDecode) Meta

func (VarIntDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (VarIntDecode) Run

func (VarIntDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decodes the VarInt.

type VarIntEncode

type VarIntEncode struct{}

VarIntEncode encodes a non-negative integer as an LEB128 variable-length int.

func (VarIntEncode) Args

func (VarIntEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (VarIntEncode) Meta

func (VarIntEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (VarIntEncode) Run

func (VarIntEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encodes the VarInt.

type ViewBitPlane

type ViewBitPlane struct{}

ViewBitPlane renders a single bit of a single channel as a black-and-white image.

func (ViewBitPlane) Args

func (ViewBitPlane) Args() []core.ArgDef

Args returns the channel and which bit to show.

func (ViewBitPlane) Meta

func (ViewBitPlane) Meta() core.OpMeta

Meta returns the operation metadata.

func (ViewBitPlane) Run

func (ViewBitPlane) Run(in *core.Dish, args []any) (*core.Dish, error)

Run renders the bit plane. The bit argument is checked inside the transform so that an unreadable image is reported first, as upstream reports it.

type VigenereDecode

type VigenereDecode struct{}

VigenereDecode decrypts with the Vigenère cipher.

func (VigenereDecode) Args

func (VigenereDecode) Args() []core.ArgDef

Args returns the argument definitions.

func (VigenereDecode) Meta

func (VigenereDecode) Meta() core.OpMeta

Meta returns the operation metadata.

func (VigenereDecode) Run

func (VigenereDecode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts with the Vigenère cipher.

type VigenereEncode

type VigenereEncode struct{}

VigenereEncode encrypts with the Vigenère cipher.

func (VigenereEncode) Args

func (VigenereEncode) Args() []core.ArgDef

Args returns the argument definitions.

func (VigenereEncode) Meta

func (VigenereEncode) Meta() core.OpMeta

Meta returns the operation metadata.

func (VigenereEncode) Run

func (VigenereEncode) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts with the Vigenère cipher.

type Whirlpool

type Whirlpool struct{}

Whirlpool computes the Whirlpool hash (or its -0/-T variants).

func (Whirlpool) Args

func (Whirlpool) Args() []core.ArgDef

Args returns the argument definitions.

func (Whirlpool) Meta

func (Whirlpool) Meta() core.OpMeta

Meta returns the operation metadata.

func (Whirlpool) Run

func (Whirlpool) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the Whirlpool hash.

type WindowsFiletimeToUNIXTimestamp

type WindowsFiletimeToUNIXTimestamp struct{}

WindowsFiletimeToUNIXTimestamp converts a Windows Filetime to a UNIX timestamp.

func (WindowsFiletimeToUNIXTimestamp) Args

Args returns the argument definitions.

func (WindowsFiletimeToUNIXTimestamp) Meta

Meta returns the operation metadata.

func (WindowsFiletimeToUNIXTimestamp) Run

func (WindowsFiletimeToUNIXTimestamp) Run(in *core.Dish, args []any) (*core.Dish, error)

Run converts the filetime.

type Wrap

type Wrap struct{}

Wrap breaks the input into fixed-width lines.

func (Wrap) Args

func (Wrap) Args() []core.ArgDef

Args returns the argument definitions.

func (Wrap) Meta

func (Wrap) Meta() core.OpMeta

Meta returns the operation metadata.

func (Wrap) Run

func (Wrap) Run(in *core.Dish, args []any) (*core.Dish, error)

Run wraps the input. Ported from CyberChef Wrap.mjs, which matches /.{1,width}/g and joins with newlines — "." excludes line terminators, so existing line breaks split runs and empty runs are dropped. Reimplemented with rune chunking rather than a regexp, since Go's regexp caps repeat counts at 1000 (below the 65536 max width) and would otherwise panic.

type XKCDRandomNumber

type XKCDRandomNumber struct{}

XKCDRandomNumber gives a random number.

func (XKCDRandomNumber) Args

func (XKCDRandomNumber) Args() []core.ArgDef

Args returns the argument definitions.

func (XKCDRandomNumber) Meta

func (XKCDRandomNumber) Meta() core.OpMeta

Meta returns the operation metadata.

func (XKCDRandomNumber) Run

func (XKCDRandomNumber) Run(in *core.Dish, args []any) (*core.Dish, error)

Run gives the number.

type XMLBeautify

type XMLBeautify struct{}

XMLBeautify struct.

func (XMLBeautify) Args

func (XMLBeautify) Args() []core.ArgDef

Args returns the argument definitions.

func (XMLBeautify) Meta

func (XMLBeautify) Meta() core.OpMeta

Meta returns the operation metadata.

func (XMLBeautify) Run

func (XMLBeautify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run beautifies the XML input.

type XMLMinify

type XMLMinify struct{}

XMLMinify struct.

func (XMLMinify) Args

func (XMLMinify) Args() []core.ArgDef

Args returns the argument definitions.

func (XMLMinify) Meta

func (XMLMinify) Meta() core.OpMeta

Meta returns the operation metadata.

func (XMLMinify) Run

func (XMLMinify) Run(in *core.Dish, args []any) (*core.Dish, error)

Run minifies the XML input. Unless comments are preserved, HTML/XML comments are stripped and whitespace before xmlns is collapsed; then whitespace between tags is removed.

type XOR

type XOR struct{}

XOR XORs the input with a repeating key, supporting CyberChef's key schemes.

func (XOR) Args

func (XOR) Args() []core.ArgDef

Args returns the argument definitions.

func (XOR) Meta

func (XOR) Meta() core.OpMeta

Meta returns the operation metadata.

func (XOR) Run

func (XOR) Run(in *core.Dish, args []any) (*core.Dish, error)

Run applies the XOR.

type XORBruteForce

type XORBruteForce struct{}

XORBruteForce enumerates every XOR key up to the configured length, optionally filtering results by a crib (known plaintext).

func (XORBruteForce) Args

func (XORBruteForce) Args() []core.ArgDef

Args returns the argument definitions.

func (XORBruteForce) Meta

func (XORBruteForce) Meta() core.OpMeta

Meta returns the operation metadata.

func (XORBruteForce) Run

func (XORBruteForce) Run(in *core.Dish, args []any) (*core.Dish, error)

Run enumerates the keys.

type XORChecksum

type XORChecksum struct{}

XORChecksum computes a block-wise XOR checksum: the input is split into blocks of the given size, and the checksum is the XOR of all blocks (a short final block leaves the trailing positions unchanged). Ported from CyberChef's XORChecksum; the result is returned as hex.

func (XORChecksum) Args

func (XORChecksum) Args() []core.ArgDef

Args returns the argument definitions.

func (XORChecksum) Meta

func (XORChecksum) Meta() core.OpMeta

Meta returns the operation metadata.

func (XORChecksum) Run

func (XORChecksum) Run(in *core.Dish, args []any) (*core.Dish, error)

Run computes the block-wise XOR checksum.

type XPRESSDecompress added in v1.1.0

type XPRESSDecompress struct{}

XPRESSDecompress reads a plain LZ77 stream back into the bytes it was made from.

func (XPRESSDecompress) Args added in v1.1.0

func (XPRESSDecompress) Args() []core.ArgDef

Args returns the argument definitions.

func (XPRESSDecompress) Meta added in v1.1.0

func (XPRESSDecompress) Meta() core.OpMeta

Meta returns the operation metadata.

func (XPRESSDecompress) Run added in v1.1.0

func (XPRESSDecompress) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run decompresses the input.

type XPRESSHuffmanDecompress added in v1.1.0

type XPRESSHuffmanDecompress struct{}

XPRESSHuffmanDecompress reads an LZ77+Huffman stream back into the bytes it was made from.

func (XPRESSHuffmanDecompress) Args added in v1.1.0

Args returns the argument definitions. The size counts bytes, so a fractional value is a mistake rather than something to truncate.

func (XPRESSHuffmanDecompress) Meta added in v1.1.0

Meta returns the operation metadata.

func (XPRESSHuffmanDecompress) Run added in v1.1.0

func (XPRESSHuffmanDecompress) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input into the size given.

type XPathExpression

type XPathExpression struct{}

XPathExpression extracts information from an XML document with an XPath query. Ported from CyberChef XPathExpression.mjs, which wraps @xmldom/xmldom and the npm `xpath` library. cchef reuses the internal xmldom parser/serializer and evaluates the query with antchfx/xpath over the parsed tree. Only node-set results are supported (as in the original): a number/string/boolean result is an error, matching the `xpath` library's "Cannot convert X to nodeset".

Known divergence: antchfx/xpath has no processing-instruction node type (it compiles `processing-instruction()` to a match-all test), so that rarely-used node test returns every node instead of only PIs. All other node tests — including `comment()`, which correctly skips the XML declaration — match the oracle.

func (XPathExpression) Args

func (XPathExpression) Args() []core.ArgDef

Args returns the argument definitions.

func (XPathExpression) Meta

func (XPathExpression) Meta() core.OpMeta

Meta returns the operation metadata.

func (XPathExpression) Run

func (XPathExpression) Run(in *core.Dish, args []any) (*core.Dish, error)

Run evaluates the XPath query and joins the serialized result nodes.

type XSalsa20

type XSalsa20 struct{}

XSalsa20 is the XSalsa20 stream cipher (24-byte nonce).

func (XSalsa20) Args

func (XSalsa20) Args() []core.ArgDef

Args returns the argument definitions.

func (XSalsa20) Meta

func (XSalsa20) Meta() core.OpMeta

Meta returns the operation metadata.

func (XSalsa20) Run

func (XSalsa20) Run(in *core.Dish, args []any) (*core.Dish, error)

Run performs the XSalsa20 stream cipher.

type XTEADecrypt

type XTEADecrypt struct{}

XTEADecrypt decrypts with the XTEA block cipher.

func (XTEADecrypt) Args

func (XTEADecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (XTEADecrypt) Meta

func (XTEADecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (XTEADecrypt) Run

func (XTEADecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts with XTEA.

type XTEAEncrypt

type XTEAEncrypt struct{}

XTEAEncrypt encrypts with the XTEA block cipher.

func (XTEAEncrypt) Args

func (XTEAEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (XTEAEncrypt) Meta

func (XTEAEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (XTEAEncrypt) Run

func (XTEAEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts with XTEA.

type XXTEADecrypt

type XXTEADecrypt struct{}

XXTEADecrypt decrypts with the XXTEA (Corrected Block TEA) cipher.

func (XXTEADecrypt) Args

func (XXTEADecrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (XXTEADecrypt) Meta

func (XXTEADecrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (XXTEADecrypt) Run

func (XXTEADecrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decrypts with XXTEA.

type XXTEAEncrypt

type XXTEAEncrypt struct{}

XXTEAEncrypt encrypts with the XXTEA (Corrected Block TEA) cipher.

func (XXTEAEncrypt) Args

func (XXTEAEncrypt) Args() []core.ArgDef

Args returns the argument definitions.

func (XXTEAEncrypt) Meta

func (XXTEAEncrypt) Meta() core.OpMeta

Meta returns the operation metadata.

func (XXTEAEncrypt) Run

func (XXTEAEncrypt) Run(in *core.Dish, args []any) (*core.Dish, error)

Run encrypts with XXTEA.

type YAMLToJSON

type YAMLToJSON struct{}

YAMLToJSON converts YAML into JSON.

func (YAMLToJSON) Args

func (YAMLToJSON) Args() []core.ArgDef

Args returns the argument definitions.

func (YAMLToJSON) Meta

func (YAMLToJSON) Meta() core.OpMeta

Meta returns the operation metadata.

func (YAMLToJSON) Run

func (YAMLToJSON) Run(in *core.Dish, _ []any) (*core.Dish, error)

Run converts YAML input to JSON.

type YARARules

type YARARules struct{}

YARARules matches the input against a set of YARA rules.

func (YARARules) Args

func (YARARules) Args() []core.ArgDef

Args returns the argument definitions.

func (YARARules) Meta

func (YARARules) Meta() core.OpMeta

Meta returns the operation metadata.

func (YARARules) Run

func (YARARules) Run(in *core.Dish, args []any) (*core.Dish, error)

Run matches the input against the rules.

type Zip

type Zip struct{}

Zip packs the input into a ZIP archive holding one file.

func (Zip) Args

func (Zip) Args() []core.ArgDef

Args returns the argument definitions.

func (Zip) Meta

func (Zip) Meta() core.OpMeta

Meta returns the operation metadata.

func (Zip) Run

func (Zip) Run(in *core.Dish, args []any) (*core.Dish, error)

Run builds the archive.

type ZlibDeflate

type ZlibDeflate struct{}

ZlibDeflate compresses the input into a zlib stream.

func (ZlibDeflate) Args

func (ZlibDeflate) Args() []core.ArgDef

Args returns the argument definitions.

func (ZlibDeflate) Meta

func (ZlibDeflate) Meta() core.OpMeta

Meta returns the operation metadata.

func (ZlibDeflate) Run

func (ZlibDeflate) Run(in *core.Dish, args []any) (*core.Dish, error)

Run compresses the input.

type ZlibInflate

type ZlibInflate struct{}

ZlibInflate reads a zlib stream back into the bytes it was made from.

func (ZlibInflate) Args

func (ZlibInflate) Args() []core.ArgDef

Args returns the argument definitions.

func (ZlibInflate) Meta

func (ZlibInflate) Meta() core.OpMeta

Meta returns the operation metadata.

func (ZlibInflate) Run

func (ZlibInflate) Run(in *core.Dish, args []any) (*core.Dish, error)

Run decompresses the input. Only the start index has any bearing on the result; the other three size and grow the reader's working buffer.

Source Files

Jump to

Keyboard shortcuts

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