ThomasHabets / arping

ARP Ping
http://www.habets.pp.se/synscan/programs.php
GNU General Public License v2.0
398 stars 62 forks source link

libnet_get_hwaddr(): socket: Permission denied #35

Closed lasyka closed 4 years ago

lasyka commented 4 years ago

When i run arping -i wlan0 192.x.x.x , get this error : libnet_get_hwaddr(): socket: Permission denied.

I,m already use the root account to run it. and i wrote simple test code to invoke libnet_get_hwaddr() ,there's no problem,and retun right hwcode. Or run other app that uses libnet‘s method,also no problem. only run arping ,get this error.

My env. is linux chroot on android phone: Linux kali 3.10.40-lasyka+ #30 SMP PREEMPT Sat Sep 29 19:40:50 CST 2018 armv7l GNU/Linux

ThomasHabets commented 4 years ago

Could you add both:

  1. The output of arping run with -vvvvv
  2. The smaller test program, in full?
lasyka commented 4 years ago

Could you add both:

  1. The output of arping run with -vvvvv
  2. The smaller test program, in full?

Thanks for your help. use the vvvvv option got the drop uid/gid info. And add -g option to run arping,the error is gone.

ThomasHabets commented 4 years ago

So you're saying Android doesn't have a group for "nobody"? What user did you choose with -g?

ThomasHabets commented 4 years ago

Oh right, this is https://github.com/ThomasHabets/arping/issues/25