-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathshow_crawl_data.php
More file actions
25 lines (23 loc) · 935 Bytes
/
show_crawl_data.php
File metadata and controls
25 lines (23 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
require_once('runtime.php');
require_once(ROOT_DIR.'/lib/core/Ip.class.php');
require_once(ROOT_DIR.'/lib/core/ConfigLine.class.php');
$ip = new Ip((int)$_GET['ip_id']);
if($ip->fetch()) {
$return = array();
if($ip->getNetwork()->getIpv()==6)
$command = "curl -s --max-time 10 -g http://[".$ip->getIp()."%25\$(cat /sys/class/net/".ConfigLine::configByName("network_connection_ipv6_interface")."/ifindex)]/node.data | zcat -f";
elseif($ip->getNetwork()->getIpv()==4)
$command = "curl -s --max-time 10 -g http://".$ip->getIp()."/node.data | zcat -f";
exec($command, $return);
$return_string = "";
foreach($return as $string) {
$return_string .= $string;
}
$smarty->assign('crawl_data', htmlentities($return_string));
}
$smarty->assign('message', Message::getMessage());
$smarty->display("header.tpl.html");
$smarty->display("show_crawl_data.tpl.html");
$smarty->display("footer.tpl.html");
?>