예제 #1
0
     $tpl->assign('profile_id', $profile_id);
     $tpl->assign('setting_name', $setting_name);
     $tpl->assign('results', $results);
     $tpl->display('view_scan_history.tpl');
     break;
 case "make_nessusrc":
     require_once _ABSPATH . '/lib/ScanMaker.php';
     if (!(include_once _ABSPATH . '/lib/pear/HTTP/Download.php')) {
         die("Could not find the PEAR HTTP/Download.php file");
     }
     $profile_id = import_var('profile_id');
     $_snm = new ScanMaker($profile_id);
     $_snm->scanner_set = $_snm->getAllPlugins();
     $settings = $_snm->getProfileSettings($profile_id);
     $_snm->merge_severities();
     $_snm->merge_families();
     $_snm->merge_plugin_profiles();
     $_snm->merge_plugins();
     $_snm->merge_all();
     // Make the nessusrc file that contains scanner settings
     $output = $_snm->get_nrc_file_data($_snm->scanner_set, $settings);
     $filename = "nessusrc";
     $format = "txt";
     $params = array('data' => $output, 'cache' => false, 'contenttype' => 'application/octet-stream', 'contentdisposition' => array(HTTP_DOWNLOAD_ATTACHMENT, "{$filename}.{$format}"));
     HTTP_DOWNLOAD::staticSend($params, false);
     break;
     break;
 case "make_machine_list":
     require_once _ABSPATH . '/lib/ScanMaker.php';
     if (!@(include_once _ABSPATH . '/lib/pear/HTTP/Download.php')) {
         die("Could not find the PEAR HTTP/Download.php file");