mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
0f8ccf3862
commit
a1875e45a2
1 changed files with 6 additions and 10 deletions
16
main.go
16
main.go
|
@ -12,10 +12,8 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
var sess *session.Session
|
||||
var err error
|
||||
|
||||
if sess, err = session.New(); err != nil {
|
||||
sess, err := session.New()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
@ -58,12 +56,10 @@ func main() {
|
|||
log.Fatal("%s", err)
|
||||
}
|
||||
|
||||
/*
|
||||
* Commands sent with -eval are used to set specific
|
||||
* caplet parameters (i.e. arp.spoof.targets) via command
|
||||
* line, therefore they need to be executed first otherwise
|
||||
* modules might already be started.
|
||||
*/
|
||||
// Commands sent with -eval are used to set specific
|
||||
// caplet parameters (i.e. arp.spoof.targets) via command
|
||||
// line, therefore they need to be executed first otherwise
|
||||
// modules might already be started.
|
||||
for _, cmd := range session.ParseCommands(*sess.Options.Commands) {
|
||||
if err = sess.Run(cmd); err != nil {
|
||||
log.Error("Error while running '%s': %s", core.Bold(cmd), core.Red(err.Error()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue