bettercap: Index | Files

package caplets

import ""

Package caplets contains functions to enumerate, load and execute caplets.


Package Files

caplet.go doc.go env.go manager.go


const (
    EnvVarName     = "CAPSPATH"
    Suffix         = ".cap"
    InstallArchive = ""
    InstallBase    = "/usr/local/share/bettercap/"


var (
    InstallPathArchive = filepath.Join(InstallBase, "caplets-master")
    InstallPath        = filepath.Join(InstallBase, "caplets")

    LoadPaths = []string{

type Caplet Uses

type Caplet struct {
    Name    string   `json:"name"`
    Scripts []Script `json:"scripts"`

func List Uses

func List() []*Caplet

func Load Uses

func Load(name string) (error, *Caplet)

func NewCaplet Uses

func NewCaplet(name string, path string, size int64) Caplet

func (*Caplet) Eval Uses

func (cap *Caplet) Eval(argv []string, lineCb func(line string) error) error

type Script Uses

type Script struct {
    Path string   `json:"path"`
    Size int64    `json:"size"`
    Code []string `json:"code"`

Package caplets imports 9 packages (graph) and is imported by 6 packages. Updated 2019-03-26. Refresh now. Tools for package owners.