Documentation
¶
Index ¶
- type Generator
- func (g *Generator) BadUSB(ctx context.Context, description string, targetOS string, ...) (*Result, error)
- func (g *Generator) Deploy(ctx context.Context, result *Result, path string) error
- func (g *Generator) EvilPortal(ctx context.Context, description string) (*Result, error)
- func (g *Generator) IR(ctx context.Context, description string) (*Result, error)
- func (g *Generator) NFC(ctx context.Context, description string) (*Result, error)
- func (g *Generator) SetCache(c *semcache.Cache)
- func (g *Generator) SetCacheBypass(bypass bool)
- func (g *Generator) SetFallback(p provider.Provider)
- func (g *Generator) SubGHz(ctx context.Context, description string) (*Result, error)
- type Result
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 (*Generator) EvilPortal ¶
func (*Generator) SetCache ¶ added in v0.53.0
SetCache wires a semantic cache into the generator. Pass nil to disable. Subsequent generation calls (EvilPortal, BadUSB, SubGHz, IR, NFC) will check the cache before falling through to the LLM, and write successful non-refusal responses back into it.
func (*Generator) SetCacheBypass ¶ added in v0.53.0
SetCacheBypass toggles the "skip-on-read, still-write" mode. Useful for `--no-cache` CLI flags or `/regen` REPL commands: the operator wants a fresh generation but still wants the new bytes cached for future use. Pass false to resume normal cache-read behaviour.
func (*Generator) SetFallback ¶ added in v0.20.0
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.
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.