generate

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

Generator creates, validates, deploys, and runs payloads on the Flipper Zero.

func New

func (*Generator) BadUSB

func (g *Generator) BadUSB(ctx context.Context, description string, targetOS string, keyboardLayout string) (*Result, error)

func (*Generator) Deploy

func (g *Generator) Deploy(ctx context.Context, result *Result, path string) error

func (*Generator) EvilPortal

func (g *Generator) EvilPortal(ctx context.Context, description string) (*Result, error)

func (*Generator) IR

func (g *Generator) IR(ctx context.Context, description string) (*Result, error)

func (*Generator) NFC

func (g *Generator) NFC(ctx context.Context, description string) (*Result, error)

func (*Generator) SetFallback added in v0.20.0

func (g *Generator) SetFallback(p provider.Provider)

SetFallback wires a secondary provider that's consulted when the primary returns text matching a canonical refusal pattern. Pass nil to disable. The fallback is typically a local Ollama instance for engagements where Anthropic policy refuses legitimate offensive payload synthesis.

func (*Generator) SubGHz

func (g *Generator) SubGHz(ctx context.Context, description string) (*Result, error)

type Result

type Result struct {
	Type     string `json:"type"`
	Content  string `json:"content"`
	Path     string `json:"path"`
	Deployed bool   `json:"deployed"`
	Preview  string `json:"preview"`
	// Provider names the LLM that served the request when a
	// refusal-fallback fired. Empty when the primary provider
	// generated the response (the common case).
	Provider string `json:"provider,omitempty"`
}

Result of a generation operation.

Jump to

Keyboard shortcuts

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