mirror of
https://github.com/bettercap/bettercap
synced 2025-07-10 07:13:36 -07:00
refact: refactored to use islazy and updated deps
This commit is contained in:
parent
a2b3ee79fb
commit
d070445225
238 changed files with 12662 additions and 1586 deletions
|
@ -13,6 +13,9 @@ import (
|
|||
"github.com/bettercap/bettercap/session"
|
||||
|
||||
"github.com/chifflier/nfqueue-go/nfqueue"
|
||||
|
||||
"github.com/evilsocket/islazy/fs"
|
||||
"github.com/evilsocket/islazy/tui"
|
||||
)
|
||||
|
||||
type PacketProxy struct {
|
||||
|
@ -141,8 +144,8 @@ func (pp *PacketProxy) Configure() (err error) {
|
|||
}
|
||||
|
||||
if pp.pluginPath == "" {
|
||||
return fmt.Errorf("The parameter %s can not be empty.", core.Bold("packet.proxy.plugin"))
|
||||
} else if !core.Exists(pp.pluginPath) {
|
||||
return fmt.Errorf("The parameter %s can not be empty.", tui.Bold("packet.proxy.plugin"))
|
||||
} else if !fs.Exists(pp.pluginPath) {
|
||||
return fmt.Errorf("%s does not exist.", pp.pluginPath)
|
||||
}
|
||||
|
||||
|
@ -194,7 +197,7 @@ func (pp *PacketProxy) Start() error {
|
|||
}
|
||||
|
||||
return pp.SetRunning(true, func() {
|
||||
log.Info("%s started on queue number %d", core.Green("packet.proxy"), pp.queueNum)
|
||||
log.Info("%s started on queue number %d", tui.Green("packet.proxy"), pp.queueNum)
|
||||
|
||||
defer pp.destroyQueue()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue