From: Pascal Hambourg on
Hello,

Shi a �crit :
>
> This -sP -PE option does work but it requires root access while the
> simple ping command does not.

Sending ICMP echo requires root privileges because it uses a raw socket.
Unlike nmap, the ping command usually has the setuid bit set, so it does
not require to be run as root.

ls -l $(which ping)
ls -l $(which nmap)
From: Pascal Hambourg on
habibielwa7id a �crit :
>
> arping is better

But ARP scan requires to be directly connected to the target network.
You cannot ARP scan a remote network.
From: Chris Davies on
Shi <jinzishuai(a)gmail.com> wrote:
> This -sP -PE option does work but it requires root access while the
> simple ping command does not.

ls -l /bin/ping
-rwsr-xr-x 1 root root 30788 2007-12-10 04:03 /bin/ping

Both tools (ping and nmap) require root privileges.


> I am looking for a nmap equivalent to the ping, nothing more (more is
> OK as long as no extra requirement, such as being root), nothing less.

You HAVE to run with root privileges to create an ICMP packet. Ping
is setuid root. NMap isn't. Therefore, you have to provide those root
privileges to the environment in which nmap is run.

Chris
From: Shi on
On May 6, 5:23 am, Chris Davies <chris-use...(a)roaima.co.uk> wrote:
> Shi <jinzish...(a)gmail.com> wrote:
> > This -sP -PE option does work but it requires root access while the
> > simple ping command does not.
>
> ls -l /bin/ping
> -rwsr-xr-x 1 root root 30788 2007-12-10 04:03 /bin/ping
>
> Both tools (ping and nmap) require root privileges.
>
> > I am looking for a nmap equivalent to the ping, nothing more (more is
> > OK as long as no extra requirement, such as being root), nothing less.
>
> You HAVE to run with root privileges to create an ICMP packet. Ping
> is setuid root. NMap isn't. Therefore, you have to provide those root
> privileges to the environment in which nmap is run.
>
> Chris

Thank you all.
Now it is clear to me why ping works while nmap -sP -PE requires root
access.
I guess there is simply no way around it.
From: Chris Davies on
Shi <jinzishuai(a)gmail.com> wrote:
> Now it is clear to me why ping works while nmap -sP -PE requires root
> access.

No, it sounds like it's not clear to you at all. *BOTH* utilities require
root access.

Chris