You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to use this library for sending some ARP requests, and I get an
operation not permitted
error when I try to create a client. I'm getting the interfacing, passing it's pointer to the NewClient method. like so:
ifaces, _ := net.Interfaces()
// The third for me is the relevant one.
client, err := arp.NewClient(&ifaces[2])
if err != nil {
fmt.Println(err)
}
target := net.ParseIP("10.0.18.70")
err = client.Request(target)
if err != nil {
fmt.Println(err)
}
So I then get a nil error when I call client.Request, because the original client is not permitted. Is this the correct way to proceed? Should I be using sudo? When I do that it complains that the GOPATH isn't set, and things get tricky.
The text was updated successfully, but these errors were encountered:
Yep, raw sockets require root permissions, or the CAP_NET_RAW capability (see man 7 capabilities).
It sounds like you're trying to use go run instead of go build? go build the binary as your user and then use sudo or set the capability on it to run it.
Hi, I'm trying to use this library for sending some ARP requests, and I get an
error when I try to create a client. I'm getting the interfacing, passing it's pointer to the
NewClient
method. like so:So I then get a nil error when I call client.Request, because the original client is not permitted. Is this the correct way to proceed? Should I be using sudo? When I do that it complains that the GOPATH isn't set, and things get tricky.
The text was updated successfully, but these errors were encountered: