mirror of
https://github.com/manuelkasper/AS-Stats.git
synced 2025-02-20 11:44:12 +08:00
Fix AS-SET lookup on systems where the whois command returns additional lines.
This commit is contained in:
parent
f149dce73f
commit
436fe23352
3
README
3
README
@ -7,6 +7,9 @@ Changes
|
||||
-------
|
||||
vx.xx Add links to PeeringDB and robtex
|
||||
(suggested by Steve Glendinning)
|
||||
|
||||
Fix AS-SET lookup on systems where the whois command returns
|
||||
additional lines.
|
||||
|
||||
|
||||
v1.36 Fix creation of new RRDs when multiple entries with the same
|
||||
|
10
www/func.inc
10
www/func.inc
@ -164,7 +164,15 @@ function getASSET($asset) {
|
||||
$cmd = $whois ." -h whois.radb.net '!i".$asset."'";
|
||||
|
||||
$return_aslist = explode("\n",shell_exec($cmd));
|
||||
$aslist = explode(" ",$return_aslist[1]);
|
||||
|
||||
/* find the line that contains the AS-SET members */
|
||||
$aslist = array();
|
||||
foreach ($return_aslist as $asline) {
|
||||
if (preg_match("/^AS/", $asline)) {
|
||||
$aslist = explode(" ", $asline);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$f = fopen($assetfile,"w");
|
||||
foreach ($aslist as $as) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user