mirror of
https://github.com/bettercap/bettercap
synced 2025-07-10 07:13:36 -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() {
|
func main() {
|
||||||
var sess *session.Session
|
sess, err := session.New()
|
||||||
var err error
|
if err != nil {
|
||||||
|
|
||||||
if sess, err = session.New(); err != nil {
|
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
@ -58,12 +56,10 @@ func main() {
|
||||||
log.Fatal("%s", err)
|
log.Fatal("%s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
// Commands sent with -eval are used to set specific
|
||||||
* Commands sent with -eval are used to set specific
|
// caplet parameters (i.e. arp.spoof.targets) via command
|
||||||
* caplet parameters (i.e. arp.spoof.targets) via command
|
// line, therefore they need to be executed first otherwise
|
||||||
* line, therefore they need to be executed first otherwise
|
// modules might already be started.
|
||||||
* modules might already be started.
|
|
||||||
*/
|
|
||||||
for _, cmd := range session.ParseCommands(*sess.Options.Commands) {
|
for _, cmd := range session.ParseCommands(*sess.Options.Commands) {
|
||||||
if err = sess.Run(cmd); err != nil {
|
if err = sess.Run(cmd); err != nil {
|
||||||
log.Error("Error while running '%s': %s", core.Bold(cmd), core.Red(err.Error()))
|
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