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 = ""


var (
    InstallBase        = getInstallBase()
    InstallPathArchive = filepath.Join(InstallBase, "caplets-master")
    InstallPath        = filepath.Join(InstallBase, "caplets")
    ArchivePath        = filepath.Join(os.TempDir(), "")

    LoadPaths = []string{
        filepath.Join(getUserHomeDir(), "caplets"),

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) (*Caplet, error)

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 11 packages (graph) and is imported by 6 packages. Updated 2019-11-25. Refresh now. Tools for package owners.