本文整理汇总了PHP中Av_sensor::is_in_db方法的典型用法代码示例。如果您正苦于以下问题:PHP Av_sensor::is_in_db方法的具体用法?PHP Av_sensor::is_in_db怎么用?PHP Av_sensor::is_in_db使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Av_sensor
的用法示例。
在下文中一共展示了Av_sensor::is_in_db方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$ttargets[$target]['snames'] = $snames;
// target name
$ttargets[$target]['name'] = $name;
// sensors permissions
$ttargets[$target]['sensors_perms'] = $sperm;
// sensors permissions
$ttargets[$target]['vuln_scanner'] = $vs;
// Nmap status
$ttargets[$target]['nmap_scan'] = $snmap;
// Load
$ttargets[$target]['load'] = $load;
}
// group targets by group and sensors
$result = array();
foreach ($ttargets as $target => $target_data) {
if (Av_sensor::is_in_db($conn, $target_data['sensor']) == TRUE) {
if (!empty($target_data['hostgroup_id'])) {
$result_key = $target_data['hostgroup_id'] . '#hostgroup#' . $target_data['sensor'];
$result[$result_key]['name'] = Asset_group::get_name_by_id($conn, $target_data['hostgroup_id']);
} else {
if (!empty($target_data['netgroup_id'])) {
$result_key = $target_data['netgroup_id'] . '#netgroup#' . $target_data['sensor'];
$result[$result_key]['name'] = Net_group::get_name_by_id($conn, $target_data['netgroup_id']);
} else {
$result_key = $target . '#' . $target_data['sensor'];
$result[$result_key]['name'] = $target_data['name'];
}
}
$result[$result_key]['ips'][] = $target;
$result[$result_key]['sensor'] = $target_data['sensor'];
$result[$result_key]['sperm'] = empty($result[$result_key]['sperm']) || $result[$result_key]['sperm'] == 1 ? $target_data['sperm'] : $result[$result_key]['sperm'];