mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
new: preloading and exporting caplets from api.rest
This commit is contained in:
parent
6b9b27302e
commit
3edf80fc99
3 changed files with 67 additions and 17 deletions
|
@ -9,10 +9,19 @@ import (
|
|||
)
|
||||
|
||||
type Caplet struct {
|
||||
Name string
|
||||
Path string
|
||||
Size int64
|
||||
Code []string
|
||||
Name string `json:"name"`
|
||||
Path string `json:"path"`
|
||||
Size int64 `json:"size"`
|
||||
Code []string `json:"code"`
|
||||
}
|
||||
|
||||
func NewCaplet(name string, path string, size int64) Caplet {
|
||||
return Caplet{
|
||||
Name: name,
|
||||
Path: path,
|
||||
Size: size,
|
||||
Code: make([]string, 0),
|
||||
}
|
||||
}
|
||||
|
||||
func (cap *Caplet) Eval(argv []string, lineCb func(line string) error) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue