All pastes #914439 Raw Edit

Stuff

public text v1 · immutable
·published 2008-02-22 21:55 UTC
rendered paste body
#!/usr/bin/php -q
<?php
$ips=shell_exec("/sbin/ip addr | grep 69.42");
$ipList=explode("\n",$ips);

for ($i=0;$i<count($ipList)-1;$i++) {
        preg_match("/inet ([0-9\.]+)\/27/",$ipList[$i],$matches);
        echo "IP ".($i+1).": ".$matches[1]." DNS: ".gethostbyaddr($matches[1])."\n";
}
?>