bettercap: github.com/bettercap/bettercap/caplets Index | Files

package caplets

import "github.com/bettercap/bettercap/caplets"

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

Index

Package Files

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

Constants

const (
    EnvVarName     = "CAPSPATH"
    Suffix         = ".cap"
    InstallArchive = "https://github.com/bettercap/caplets/archive/master.zip"
    InstallBase    = "/usr/local/share/bettercap/"
)

Variables

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

    LoadPaths = []string{
        "./",
        "./caplets/",
        InstallPath,
    }
)

type Caplet Uses

type Caplet struct {
    Script
    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.