function network_scanner_execute() { $tpl = new templates(); $net = new networkscanner(); $net->save(); $sock = new sockets(); $sock->getFrameWork("cmd.php?LaunchNetworkScanner=yes"); $box = $tpl->javascript_parse_text('{network_scanner_execute_background}', 1); $ini = new Bs_IniHandler('ressources/logs/nmap.progress.ini'); $ini->set('NMAP', 'pourc', '10'); $ini->set('NMAP', 'text', '{scheduled}'); $ini->saveFile('ressources/logs/nmap.progress.ini'); echo $box; }
events('Unable to stat /usr/bin/nmap'); die; } if (is_file("/etc/artica-postfix/AS_KIMSUFFI")) { echo "AS_KIMSUFFI!\n"; die; } $cmdline = implode(" ", $argv); if (preg_match("#--verbose#", $cmdline)) { $_GET["VERBOSE"] = true; } if ($argv[1] == '--parse') { parseContent($argv[2]); die; } $net = new networkscanner(); $net->save(); if (!is_file("/etc/artica-postfix/settings/Daemons/NetworkScannerMasks")) { compevents("Unable to stat /etc/artica-postfix/settings/Daemons/NetworkScannerMasks"); die; } if (!isBuildPid(__FILE__)) { compevents("Error execution"); die; } $disabled_content = @file_get_contents("/etc/artica-postfix/settings/Daemons/NetworkScannerMasksDisabled"); $exploded = explode("\n", $disabled_content); if (is_array($exploded)) { while (list($num, $disabled_mask) = each($exploded)) { if (trim($disabled_mask) == null) { continue;