PERL Ping Permissions

Discussion in 'Software' started by Welic, Nov 28, 2006.

  1. Welic

    Welic Private E-2

    I have a CGI script that is designed to ping a few machines on my network and report if they are responding. I am using the Net::ping module, which defaults to TCP ping, and have ran into a little problem. Not all of the network devices on my network are responding to TCP echo, or UPD for that matter. So obviously, ICMP would get the job done considering the devices respond to a normal console. One problem ICMP ping requires root privileges, and keep in mind that this is a CGI script (can't just toss sudo in front of it and all is happy). Any proposal to put away my PERL ping problems would please me profusely.
     
  2. goldfish

    goldfish Lt. Sushi.DC

    If I understand correctly, you're trying to do something along the lines of
    Code:
    system("ping $host -c 10");
    
    and presumabley pipe the output into a neat little regex to give you the stats.

    Other than modify the user that the cgi script runs under to give it access to ping, I can't really think of anything. Sorry :(
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds