mirror of
https://github.com/bettercap/bettercap
synced 2025-07-05 20:42:09 -07:00
21 lines
No EOL
338 B
Go
21 lines
No EOL
338 B
Go
package session
|
|
|
|
import (
|
|
"github.com/evilsocket/islazy/plugin"
|
|
|
|
_ "github.com/bettercap/bettercap/js"
|
|
)
|
|
|
|
type Script struct {
|
|
*plugin.Plugin
|
|
}
|
|
|
|
func LoadScript(fileName string, ses *Session) (*Script, error) {
|
|
if p, err := plugin.Load(fileName); err != nil {
|
|
return nil, err
|
|
} else {
|
|
return &Script{
|
|
Plugin: p,
|
|
}, nil
|
|
}
|
|
} |