arp-spoofer: Use netip package
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
edb39c7b33
commit
4cf006c4f8
2 changed files with 13 additions and 9 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"flag"
|
||||
"log"
|
||||
"net"
|
||||
"net/netip"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -16,9 +17,9 @@ func main() {
|
|||
log.Fatal("Unable to find interface to do ARP spoof:", err)
|
||||
}
|
||||
|
||||
ipS := net.ParseIP(*ipspoof)
|
||||
if ipS == nil {
|
||||
log.Fatal("No IP given to ARP spoof. Skipping it")
|
||||
ipS, err := netip.ParseAddr(*ipspoof)
|
||||
if err != nil {
|
||||
log.Fatalf("No IP given to ARP spoof (%s). Skipping it", err.Error())
|
||||
}
|
||||
|
||||
// Start ARP spoofing
|
||||
|
|
|
|||
Reference in a new issue