mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: each module now has its own tagged logging
This commit is contained in:
parent
9003be56ca
commit
9cd4e380fb
47 changed files with 343 additions and 349 deletions
|
@ -7,7 +7,6 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/bettercap/bettercap/caplets"
|
||||
"github.com/bettercap/bettercap/log"
|
||||
"github.com/bettercap/bettercap/session"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
|
@ -115,7 +114,7 @@ func (c *CapletsModule) Paths() error {
|
|||
|
||||
func (c *CapletsModule) Update() error {
|
||||
if !fs.Exists(caplets.InstallBase) {
|
||||
log.Info("creating caplets install path %s ...", caplets.InstallBase)
|
||||
c.Info("creating caplets install path %s ...", caplets.InstallBase)
|
||||
if err := os.MkdirAll(caplets.InstallBase, os.ModePerm); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -127,7 +126,7 @@ func (c *CapletsModule) Update() error {
|
|||
}
|
||||
defer out.Close()
|
||||
|
||||
log.Info("downloading caplets from %s ...", caplets.InstallArchive)
|
||||
c.Info("downloading caplets from %s ...", caplets.InstallArchive)
|
||||
|
||||
resp, err := http.Get(caplets.InstallArchive)
|
||||
if err != nil {
|
||||
|
@ -139,7 +138,7 @@ func (c *CapletsModule) Update() error {
|
|||
return err
|
||||
}
|
||||
|
||||
log.Info("installing caplets to %s ...", caplets.InstallPath)
|
||||
c.Info("installing caplets to %s ...", caplets.InstallPath)
|
||||
|
||||
if _, err = zip.Unzip("/tmp/caplets.zip", caplets.InstallBase); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue