Ejemplo n.º 1
0
*
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck('environment-menu', 'ToolsScan');
$db = new ossim_db();
$conn = $db->connect();
$data = array();
if (Scan::scanning_now()) {
    // Scan Status
    $scanning_assets = Scan::scanning_what();
    if (count($scanning_assets) > 0) {
        foreach ($scanning_assets as $rsensor_ip) {
            $tdata = explode('#', $rsensor_ip);
            $assets[] = $tdata[1];
            $sensor_id = $tdata[0];
        }
        $sc_asset = implode(', ', $assets);
        if ($sensor_id != '' && $sensor_id != 'null') {
            $sensor_ip = Av_sensor::get_ip_by_id($conn, $sensor_id);
            $data['state'] = 'remote_scan_in_progress';
            $data['message'] = sprintf(_('Scanning network: <strong>%s</strong> with a remote sensor [<strong>%s</strong>], please wait...'), $sc_asset, $sensor_ip);
            $data['progress'] = NULL;
            $data['debug_info'] = NULL;
        } else {
            $obj = new Scan();