mirror of
https://github.com/bettercap/bettercap
synced 2025-08-13 02:06:57 -07:00
fix: user privileges check is implicit when trying to open pcap handle
This commit is contained in:
parent
1de7013eac
commit
8b44912022
1 changed files with 0 additions and 7 deletions
|
@ -6,7 +6,6 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"os/user"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
@ -83,12 +82,6 @@ func New() (*Session, error) {
|
||||||
s.Env = NewEnvironment(s)
|
s.Env = NewEnvironment(s)
|
||||||
s.Events = NewEventPool(*s.Options.Debug, *s.Options.Silent)
|
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()
|
s.registerCoreHandlers()
|
||||||
|
|
||||||
if I == nil {
|
if I == nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue