mirror of
https://github.com/bettercap/bettercap.git
synced 2025-03-12 04:36:03 -07:00
fix: user privileges check is implicit when trying to open pcap handle
This commit is contained in:
parent
1de7013eac
commit
8b44912022
@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"os/user"
|
||||
"sort"
|
||||
"strings"
|
||||
"syscall"
|
||||
@ -83,12 +82,6 @@ func New() (*Session, error) {
|
||||
s.Env = NewEnvironment(s)
|
||||
s.Events = NewEventPool(*s.Options.Debug, *s.Options.Silent)
|
||||
|
||||
if u, err := user.Current(); err != nil {
|
||||
return nil, err
|
||||
} else if u.Uid != "0" {
|
||||
return nil, fmt.Errorf("This software must run as root.")
|
||||
}
|
||||
|
||||
s.registerCoreHandlers()
|
||||
|
||||
if I == nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user