mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: gracefully handling corrupted or not compatible alias databases (fixes #391)
This commit is contained in:
parent
8cf3e65bdd
commit
85c2d0b4fa
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ package network
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -36,7 +37,7 @@ type lanJSON struct {
|
|||
func NewLAN(iface, gateway *Endpoint, newcb EndpointNewCallback, lostcb EndpointLostCallback) *LAN {
|
||||
aliases, err := data.NewUnsortedKV(aliasesFileName, data.FlushOnEdit)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
fmt.Printf("error loading %s: %s", aliasesFileName, err)
|
||||
}
|
||||
|
||||
return &LAN{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue