function privileges

M

Mr Bob

Hi, I'm wanting a user script to use Net::ping to send an icmp packet but
can't because of privileges, is there anyway I can get around this?. I
guess an alternative is to use system("ping -c 1 $host"); or whatever, but
I'd rather not.

Thanks.

NB: Noob.
 
K

Keith Keller

Hi, I'm wanting a user script to use Net::ping to send an icmp packet but
can't because of privileges, is there anyway I can get around this?

Yes--it's in the docs for Net::ping, in the paragraph that describes
what happens whe you specify icmp as the protocol.
I guess an alternative is to use system("ping -c 1 $host"); or whatever, but
I'd rather not.

Again, reading the Net::ping docs, you can try to install and use
Net::ping::External, if you don't want to use system().

--keith
 
A

axel

Mr Bob said:
Hi, I'm wanting a user script to use Net::ping to send an icmp packet but
can't because of privileges, is there anyway I can get around this?. I
guess an alternative is to use system("ping -c 1 $host"); or whatever, but
I'd rather not.

Assuming the privileges you mean are concerned with the installation of
Net::ping, then in the same directory as your script create a directory
called Net and place a copy of the Net::ping source code from CPAN in
that directory (with the filename Ping.pm).

Then assuming all else is fine, this should be picked up by your script
since the directory . should be in @INC.

In the unlucky event that the problem is caused by lack of network
privileges (as some networks do not allow ICMP traffic) then the
solution is probably buying the system and network admins beer.

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top