コード例 #1
0
function get_unresolved_alarms($conn)
{
    $alarms = intval(Alarm::get_count($conn, '', '', 1, TRUE));
    $alarms_prev = intval($_SESSION['_unresolved_alarms']);
    if ($alarms != $alarms_prev && $alarms_prev > 0) {
        $new_alarms = $alarms - $alarms_prev;
    } else {
        $new_alarms = 0;
    }
    $_SESSION['_unresolved_alarms'] = $alarms;
    $data['alarms'] = $alarms;
    $data['new_alarms'] = $new_alarms;
    $data['new_alarms_desc'] = '';
    if ($new_alarms > 0) {
        $criteria = array('src_ip' => '', 'dst_ip' => '', 'hide_closed' => 1, 'order' => 'ORDER BY a.timestamp DESC', 'inf' => 0, 'sup' => $new_alarms, 'date_from' => '', 'date_to' => '', 'query' => '', 'directive_id' => '', 'intent' => 0, 'sensor' => '', 'tag' => '', 'num_events' => '', 'num_events_op' => 0, 'plugin_id' => '', 'plugin_sid' => '', 'ctx' => '', 'host' => '', 'net' => '', 'host_group' => '');
        list($alarm_list, $count) = Alarm::get_list($conn, $criteria);
        $alarm_string = '';
        foreach ($alarm_list as $alarm) {
            $desc_alarm = Util::translate_alarm($conn, $alarm->get_sid_name(), $alarm);
            $desc_alarm = html_entity_decode(str_replace("'", "\\'", $desc_alarm));
            $desc_alarm = str_replace('"', """, $desc_alarm);
            $desc_alarm = str_replace('—', "-", $desc_alarm);
            $desc_alarm = Util::js_entities($desc_alarm);
            if ($alarm_string != '') {
                $alarm_string .= '|';
            }
            $alarm_string .= $desc_alarm;
        }
        $data['new_alarms_desc'] = $alarm_string;
    }
    $return['error'] = FALSE;
    $return['output'] = $data;
    return $return;
}
コード例 #2
0
ファイル: new_scan.php プロジェクト: alienfault/ossim
            /****************************************************
             ********************* Tooltips *********************
             ****************************************************/

            if ($(".more_info").length >= 1)
            {
                $(".more_info").tipTip({maxWidth: "auto", attribute: 'data-title'});
            }

            bind_nmap_actions();

            <?php 
if ($close) {
    $msg = sprintf(_('Asset scan in progress for %s assets'), count($targets));
    echo 'hide_window("' . Util::js_entities($msg) . '", "nf_success");';
}
?>
        });
    </script>

</head>

<body>

<!-- Asset form -->

<div id='c_info'>
    <?php 
if (!empty($e_msg)) {
    $disable_scan = TRUE;
コード例 #3
0
ファイル: new_scan.php プロジェクト: jackpf/ossim-arc
?>
" , 'nf_info', false, true, 'padding: 3px; width: 90%; margin: 12px auto 12px auto; text-align: center;');
                            }
                            
                            //var h = document.body.scrollHeight || 1000000;window.scrollTo(0,document.body.scrollHeight);
                            //window.scrollTo(0,h);
                            flag = 0;
                        },
                        error: function (request, status, error) {
                            flag = 0;
                        }
                    });
                }
				else {
                    alert("<?php 
echo Util::js_entities(_("At least one target needed!"));
?>
");
                }
            }
		}
        
		function disable_button() 
		{                       
			$("#mjob").attr("disabled","disabled");
        }
        
        function display_smethod_div()
        {
            var type = $('#scheduleM').attr('value');
			var id;
コード例 #4
0
		function refresh_page() {
			if(refresh) {
				location.reload();
			}
		}
		
		// 
		function cancelScan(id) {
			$('#working').toggle();
			$.ajax({
				type: "GET",
				url: "manage_jobs.php",
				data: { disp: "kill", sid: id },
				success: function(msg) {
					alert("<?php 
echo Util::js_entities(_("Cancelling job, please wait a few seconds. Server will stop current scan as soon as possible."));
?>
");
					document.location.reload();
				}
			});
		}
    
		function deleteTask(id) {
			if (confirmDelete()) {
				$.ajax({
					type: "GET",
					url: "manage_jobs.php",
					data: { disp: 'delete_task', job_id: id },
					success: function(msg) {
        				$.ajax({
コード例 #5
0
ファイル: index.php プロジェクト: jackpf/ossim-arc
function print_upgrade_link($file, $type, $label, $version, $required)
{
    echo "{$file}&nbsp; (";
    if (!$required) {
        $confirm = Util::js_entities(_('This will force only this upgrade and ' . 'may cause unexpected results. Use the \\\'Apply Changes\\\' ' . 'button instead.\\n\\nContinue anyway?'));
        echo "<a href=\"?version={$version}&type={$type}&force=1\" class='av_l_main' onClick=\"return confirm('{$confirm}')\">{$label}</a>)";
    } else {
        echo "{$label})";
    }
}
コード例 #6
0
ファイル: dbs.php プロジェクト: jackpf/ossim-arc
echo Util::js_entities(_("Database server unselected"));
?>
');
                }
            }

            if (com=='modify')
            {
                if (typeof(id) != 'undefined')
                {
                    document.location.href = 'newdbsform.php?id='+id;
                }
                else
                {
                    alert('<?php 
echo Util::js_entities(_("Database server unselected"));
?>
');
                }
            }

            if (com=='new')
            {
                document.location.href = 'newdbsform.php'
            }
        }


		$(document).ready(function(){

			<?php 
コード例 #7
0
ファイル: detail_group.js.php プロジェクト: jackpf/ossim-arc
                    "name" : "<?php 
echo Util::js_entities(_('Netflow'));
?>
",
                    "href" : this.cfg.common.templates + "tpl_dt_netflows.php",
                    "hide" : !this.perms.netflows,
                    "load_callback": function()
                    {
                        __self.av_sections.load_netflows();
                        
                    }
                },
                {
                    "id"   : "tab_history",
                    "name" : "<?php 
echo Util::js_entities(_('History'));
?>
",
                    "href" : this.cfg.common.templates + "tpl_dt_history.php",
                    "load_callback": function()
                    {
                        __self.av_sections.load_history();
                    }
                }
            ]
        };
        
        //Section Tabs
        this.actions = 
        [
            {
コード例 #8
0
ファイル: index.php プロジェクト: AntBean/alienvault-ossim
echo Util::js_entities(_('Remote interface unselected'));
?>
');
                }
            }

            if (com == 'modify') 
            {
                if (typeof(id) != 'undefined') 
                {
                    document.location.href = 'new_ri_form.php?id='+urlencode(id);
                }
                else
                { 
                    alert('<?php 
echo Util::js_entities(_('Remote interface unselected'));
?>
');
                }
            }
            
            if (com == 'new')
            {
                document.location.href = 'new_ri_form.php'
            }

        }        
        
        $(document).ready(function(){ 
            <?php 
if (GET('msg') == 'saved') {
コード例 #9
0
                {
                    "id"   : "tab_properties",
                    "name" : "<?php 
echo Util::js_entities(_('Properties'));
?>
",
                    "href" : this.cfg.common.templates + "tpl_dt_properties.php",
                    "load_callback": function()
                    {
                        __self.av_sections.load_properties();
                    }
                },
                {
                    "id"   : "tab_netflow",
                    "name" : "<?php 
echo Util::js_entities(_('Netflow'));
?>
",
                    "href" : this.cfg.common.templates + "tpl_dt_netflows.php",
                    "hide" : !this.perms.netflows,
                    "load_callback": function()
                    {
                        __self.av_sections.load_netflows();
                        
                    }
                }
            ]
        };
        
        this.actions = 
        [
コード例 #10
0
ファイル: pluginsid.php プロジェクト: jackpf/ossim-arc
            

            //Insert
            $('#button_insert').on('click', function()
            {
                document.location.href = 'newpluginsidform.php?plugin_id=<?php 
echo $plugin_id;
?>
'; 
            });
                       
            //Apply            
            $('#button_apply').on('click', function()
            {
                var msg  = "<?php 
echo Util::js_entities(_('The server will be restarted and all correlation data will be lost. Are you sure?'));
?>
";
                var opts = {"yes": "<?php 
echo _('Yes');
?>
", "no": "<?php 
echo _('No');
?>
"}
                av_confirm(msg, opts).done(function()
            		{
				    document.location.href = '/ossim/conf/reload.php?what=plugins&back=<?php 
echo $back_url;
?>
';
コード例 #11
0
ファイル: tickets.php プロジェクト: jackpf/ossim-arc
         if ($days > 6) {
             $days = 6;
         }
         @$ttl_groups[$days]++;
     }
     $datay = array_values($ttl_groups);
     foreach ($datay as $dy) {
         $links[] = Menu::get_menu_url("../incidents/index.php?status=Closed", 'analysis', 'tickets', 'tickets');
     }
     if (is_array($links)) {
         $links = "'" . implode("','", $links) . "'";
     }
     $aux_labels = array(_("1 Day"), _("2 Days"), _("3 Days"), _("4 Days"), _("5 Days"), _("6+ Days"));
     $size = count($aux_labels);
     for ($i = 0; $i < $size; $i++) {
         $labelx[$i] = Util::js_entities($aux_labels[$i]);
     }
     break;
 case 'ticketsClosedByMonth':
     $type_graph = 'barCumulative';
     $placement = 'insideGrid';
     $num_columns = 3;
     $legend = empty($_GET['legend']) ? "ne" : GET('legend');
     $final_values = array();
     $ticket_closed_by_month = Incident::incidents_closed_by_month($conn, null, $user);
     if (is_array($ticket_closed_by_month) && !empty($ticket_closed_by_month)) {
         foreach ($ticket_closed_by_month as $event_type => $months) {
             $label[] = "{label: '" . $event_type . "'}";
             $final_values[$event_type] = implode(",", $months);
         }
         for ($i = 0; $i < 12; $i++) {
コード例 #12
0
            place_holder = "<?php 
echo Util::js_entities(_('Select Vendor'));
?>
";
        }
        else if (name == 'model')
        {
            place_holder = "<?php 
echo Util::js_entities(_('Select Model'));
?>
";
        }
        else if (name == 'version')
        {
            place_holder = "<?php 
echo Util::js_entities(_('Select Version'));
?>
";
        }
        
        $(elem).select2(
        {
            placeholder : place_holder,
            allowClear  : true
        });
        
        
        if (name == 'vendor' && selected != '')
        {            
            /* Vendor list does not duplicate the cpe type (o, h, a) so we need to figure out if there is a matching */
            /* DEPRECATED
コード例 #13
0
ファイル: user_form.php プロジェクト: alienfault/ossim
			}
	
			function go_template(action) {
							
				if (action == "edit" || action == "new") 
				{		
					save_inputs();
					
					if (action == "edit") 
					{
						var template_id = $('#template_id').val();
						
						if (template_id == '')
						{
							alert("<?php 
    echo Util::js_entities(_("No template selected"));
    ?>
");
							return;
						}
						
						var url   =  '../acl/template_form.php?id='+template_id+'&goback=1&callback=users';
						    url  += '&m_opt=configuration&sm_opt=administration&h_opt=users&l_opt=templates';				  

					}
					else if (action == "new")
					{ 
						var url  = '../acl/template_form.php?goback=1&callback=users';
						    url += '&m_opt=configuration&sm_opt=administration&h_opt=users&l_opt=templates';
					}
コード例 #14
0
ファイル: index.php プロジェクト: AntBean/alienvault-ossim
                ?>
');$('#file').val('<?php 
                echo $category['xml_file'];
                ?>
');$('#actionform').submit();return false;" style="marging-left:20px; cursor:pointer" title="<?php 
                echo gettext("Disable this directive");
                ?>
" class="info"><img src="../pixmaps/tick.png" border="0"></img></a>
										<?php 
            }
            ?>
										<a href="" id="clone_directive_touser_button_<?php 
            echo $directive_id;
            ?>
" onclick="if (confirm('<?php 
            echo Util::js_entities(gettext("Are you sure you want to clone this directive to user category ?"));
            ?>
')) { $('#touser_directive_id').val('<?php 
            echo $directive_id;
            ?>
');$('#file').val('<?php 
            echo $category['xml_file'];
            ?>
');$('#actionform').submit(); } return false;" style="marging-left:20px; cursor:pointer" title="<?php 
            echo gettext("Clone this directive to user");
            ?>
" class="info"><img src="../pixmaps/copy.png" border="0"></img></a>
										<a href="" onclick="return false;" style="marging-left:20px; cursor:pointer" title="<?php 
            echo gettext("This directive is part of the AlienVault Feed and therefore it can not be modified. Clone it in order to make changes.");
            ?>
" class="info"><img src="../pixmaps/delete.gif" border="0" class="disabled"/></a>
コード例 #15
0
?>
";

        av_window_open(url,
        {
            width: 800,
            height: 750,
            title: 'otxwindow'
        })
    });

    $('#otx_data_link').on('click', function()
    {
        params = {
            caption : "<?php 
echo Util::js_entities(_('Open Threat Exchange Sample Data'));
?>
",
            url     : '/wizard/extra/otx_data.php',
            height  : 500,
            width   : 750
        };

        LB_show(params);
    });

}


function show_otx_step_1()
{
コード例 #16
0
ファイル: rule_tpl.php プロジェクト: jackpf/ossim-arc
    if ($level > 1) {
        ?>
-small<?php 
    }
    ?>
.png' border='0'></img></a>
                </td>
                <td width="16">
                    <?php 
    if ($this->level > 1) {
        ?>
                    <a href="" class="info" id="delete_rule_<?php 
        echo $this->id;
        ?>
" onclick="if (confirm('<?php 
        echo Util::js_entities(_("Are you sure you want to delete this rule ?"));
        ?>
')) { delete_rule('<?php 
        echo $this->id;
        ?>
', <?php 
        echo $id_dir;
        ?>
, '<?php 
        echo $xml_file;
        ?>
'); } return false;" style="marging-left:20px; cursor:pointer" TITLE="<?php 
        echo gettext("Delete this rule");
        ?>
"><img src='../pixmaps/delete-small.gif' border='0'></img></a>
                    <?php 
コード例 #17
0
ファイル: sensor.php プロジェクト: jackpf/ossim-arc
echo Util::js_entities(_('Sensor unselected'));
?>
');
                }
            }

            if (com == 'modify') 
            {
                if (typeof(id) != 'undefined') 
                {
                    document.location.href = 'interfaces.php?sensor_id='+id;
                }
                else 
                {
                    av_alert('<?php 
echo Util::js_entities(_("Sensor unselected"));
?>
');
                }
            }

            if (com == 'new') 
            {
                document.location.href = 'newsensorform.php'
            }
        }
        
    
        $(document).ready(function(){
            
            $("#flextable").flexigrid({
コード例 #18
0
ファイル: action.php プロジェクト: jackpf/ossim-arc
        			}
        			     
        		}
        		else if (com=='<?php 
echo _("Modify");
?>
') 
        		{
                    if (typeof(items[0]) != 'undefined')
                    {
                        document.location.href = 'actionform.php?id='+urlencode(items[0].id.substr(3))	
                    } 
                    else 
                    {
                        alert('<?php 
echo Util::js_entities(_("Action unselected"));
?>
');
                    }
                    
        		}
        		else if (com=='<?php 
echo _("New");
?>
') 
        		{
        			document.location.href = 'actionform.php'
        		}
        	}
        	
        	
コード例 #19
0
ファイル: av_note.js.php プロジェクト: jackpf/ossim-arc
            "asset_type"   : "",
            "asset_id"     : "",
            "notif_div"    : "",
			afterAdd : function() {
				return true;
			},
            afterDelete : function() {
				return true;
			}
        };
        
        var __keys  = {"yes": "<?php 
echo Util::js_entities(_('Yes'));
?>
","no": "<?php 
echo Util::js_entities(_('No'));
?>
"};
        
        var options = $.extend(defaults, options);

        this.each(function()
        {
            
            __create_container.call(this);
            
            __load_notes.call(this);

            __load_handlers.call(this);

            return this;
コード例 #20
0
                                                }
                                                else if(msg.match("ERROR_CANNOT")){
                                                    notify('<?php 
echo _("Sorry, cannot delete this port group because it belongs to a policy");
?>
', 'nf_error');
                                                }
												else
													$("#flextable").flexReload();
										}
						});
					}
				}
				else
					alert('<?php 
echo Util::js_entities(_("Port unselected"));
?>
');
			}

			if (com == 'newpgroup')
			  document.location.href = 'newportgroupform.php';
		}

		$("#flextable").flexigrid({
			url: 'getportgroup.php',
			dataType: 'xml',
			colModel : [
				<?php 
if (Session::show_entities()) {
    $default = array("name" => array(_("Port group"), 180, 'true', 'left', false), "ports" => array(_("Ports"), 430, 'false', 'left', false), "ctx" => array(_("Entity"), 180, 'false', 'left', false), "desc" => array(_("Description"), 380, 'false', 'left', false));
コード例 #21
0
    //Messages to show
    var __messages = {
        "selected_rows"   : "<?php 
echo _('You have selected ### properties.');
?>
",
        "select_all_rows" : "<?php 
echo _('Select ### properties.');
?>
",
        "delete_one"      : "<?php 
echo Util::js_entities(_('Are you sure you want to delete this property?'));
?>
",
        "delete_selected" : "<?php 
echo Util::js_entities(_('Are you sure you want to delete the selected properties?'));
?>
",
        "confirm_yes"     : "<?php 
echo _('Yes');
?>
",
        "confirm_no"      : "<?php 
echo _('No');
?>
",
        "unknown_error"   : "<?php 
echo _('Sorry, operation was not completed due to an error when processing the request. Please try again');
?>
"
    };
コード例 #22
0
    $op['button_export'] = TRUE;
    $op['js_file'] = '/net/js/net_list.js.php';
    $op['delete_all_msg'] = Util::js_entities(_("You are about to delete networks. This is something that cannot be undone. Are you sure you would like to delete these networks?"));
    $op['dt_ajax_url'] = AV_MAIN_PATH . '/assets/ajax/load_nets_result.php';
    $op['dt_item'] = 'networks';
    $op['dt_col_names'] = array(_('Network Name'), _('Owner(s)'), _('CIDR'), _('Sensors'), _('Alarms'), _('Vulnerabilities'), _('Events'), _('Detail'));
    $op['dt_col_config'] = array(array('bSortable' => TRUE, 'sClass' => 'left'), array('bSortable' => FALSE, 'sClass' => 'left'), array('bSortable' => FALSE, 'sClass' => 'left', "sWidth" => "150px"), array('bSortable' => FALSE, 'sClass' => 'left'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center', "sWidth" => "80px"));
} elseif ($type == 'group') {
    Session::logcheck('environment-menu', 'PolicyHosts');
    //Asset Group Configuration
    $op['list_title'] = _('Asset Groups');
    $op['button_title'] = _('Add Group');
    $op['button_dropdown'] = '';
    $op['button_export'] = FALSE;
    $op['js_file'] = '/group/js/group_list.js.php';
    $op['delete_all_msg'] = Util::js_entities(_("You are about to delete asset groups. This is something that cannot be undone. Are you sure you would like to delete these groups?"));
    $op['dt_ajax_url'] = AV_MAIN_PATH . '/assets/ajax/load_groups_result.php';
    $op['dt_item'] = 'groups';
    $op['dt_col_names'] = array(_('Group Name'), _('Owner(s)'), _('Hosts'), _('Alarms'), _('Vulnerabilities'), _('Events'), _('Detail'));
    $op['dt_col_config'] = array(array('bSortable' => TRUE, 'sClass' => 'left'), array('bSortable' => FALSE, 'sClass' => 'left'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center'), array('bSortable' => FALSE, 'sClass' => 'center', "sWidth" => "80px"));
} else {
    throw new Exception(_('Invalid Option Chosen'));
}
$db = new ossim_db();
$conn = $db->connect();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title> <?php 
echo _('AlienVault USM');
コード例 #23
0
ファイル: av_tags.js.php プロジェクト: jackpf/ossim-arc
 * 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';
?>

edit_tags = function(tag_type, callback)
{
    var url   = '<?php 
echo AV_MAIN_PATH;
?>
/tags/views/tag_manager.php?tag_type=' + tag_type;
    var title = '<?php 
echo Util::js_entities(_('Manage Labels'));
?>
';

    GB_show(title, url, '850', '850');
}

// Execute action
function delete_tag(tag_id, component_id, callback)
{
    var data = {
        'tag_id'            : tag_id,
        'action'            : 'delete_components',
        'component_ids'     : [component_id],
        'select_from_filter': false,
        'token'             : Token.get_token('av_dropdown_tag_token')
コード例 #24
0
ファイル: custom_view_edit.php プロジェクト: jackpf/ossim-arc
        echo _("Default view");
        ?>
');document.fcols.submit()" value="<?php 
        echo _("Restore Default");
        ?>
">
                    <?php 
    }
    if ($edit && $_SESSION['current_cview'] != 'default') {
        ?>
                    <input type="button" class="small av_b_secondary" onclick="document.fcols.save.value='insert';document.fcols.selected_cols.value=getselectedcombovalue('cols');document.fcols.submit()" value="<?php 
        echo _("Save As");
        ?>
" id="saveasbutton" disabled='disabled'>
                    <input type="button" class="small av_b_secondary" onclick="if(confirm('<?php 
        echo Util::js_entities(_("Are you sure?"));
        ?>
')) { document.fcols.save.value='delete';document.fcols.submit() }" value="<?php 
        echo _("Delete");
        ?>
">
                    <?php 
    }
    if (Session::am_i_admin() && $edit && !$opensource) {
        ?>
                    <input type="button"  class="small av_b_secondary" onclick="document.fcols.save.value='report';document.fcols.selected_cols.value=getselectedcombovalue('cols');document.fcols.submit()" value="<?php 
        echo _("Save as Report Module");
        ?>
">
                    <?php 
    }
コード例 #25
0
			var newref_value = $('#newref_value').val();
			
			if ( plugin_id != '' && plugin_sid != '' & newref_type != '' && newref_value != '' ) 
			{
				$.ajax({
					type: "GET",
					url: "manage_references_getrefs.php",
					data: { plugin_id:plugin_id, plugin_sid:plugin_sid, newref_type:newref_type, newref_value:newref_value },
					success: function(msg) {
						$("#references_found").html(msg);
					}
				});
			}
			else{
				alert ("<?php 
echo Util::js_entities(_("Must select Data Source/Event Type pair and type a value"));
?>
");
			}
		}


		// GreyBox
		$(document).ready(function(){
			
			GB_TYPE = 'w';
			
			$("a.greybox").click(function(){
				var t = this.title || $(this).text() || this.href;
				GB_show(t,this.href, 400, 600);
				return false;
コード例 #26
0
ファイル: alarm_detail.js.php プロジェクト: jackpf/ossim-arc
        var url    = "/alarm/alarm_console.php?<?php 
echo $_SESSION['_alarm_criteria'];
?>
";
        var p_menu = "analysis";
        var s_menu = "alarms";
        var t_menu = "alarms";
        
        link(url, p_menu, s_menu, t_menu);
    };
    
    
    function set_unknown($elem)
    {
        $elem.html("<span class='unknown'><?php 
echo Util::js_entities(_('Unknown'));
?>
</span>");
    }
    
    
    function link(url, p_menu, s_menu, t_menu)
    {
        try
        {
            url = top.av_menu.get_menu_url(url, p_menu, s_menu, t_menu);
            top.av_menu.load_content(url);
        }
        catch(Err)
        {
            document.location.href = url
コード例 #27
0
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
Session::logcheck('configuration-menu', 'CorrelationCrossCorrelation');
$action = 'insert';
$url_form = 'newpluginref.php';
$button_text = Util::js_entities(_("Create rule"));
$plugin_id1 = REQUEST('plugin_id1');
$plugin_id2 = REQUEST('plugin_id2');
$plugin_sid1 = REQUEST('plugin_sid1');
$plugin_sid2 = REQUEST('plugin_sid2');
if ($plugin_id1 != '' || $plugin_id2 != '' || $plugin_sid1 != '' || $plugin_sid2 != '') {
    $action = 'modify';
    $url_form = 'modifypluginref.php';
    $button_text = Util::js_entities(_('Save rule'));
    ossim_valid($plugin_id1, OSS_DIGIT, 'illegal:' . _('Plugin ID1'));
    ossim_valid($plugin_id2, OSS_DIGIT, 'illegal:' . _('Plugin ID2'));
    ossim_valid($plugin_sid1, OSS_DIGIT, 'illegal:' . _('Plugin SID1'));
    ossim_valid($plugin_sid2, OSS_DIGIT, 'illegal:' . _('Plugin SID2'));
    if (ossim_error()) {
        echo ossim_error();
        exit;
    }
}
$db = new ossim_db();
$conn = $db->connect();
$plugin_list = Plugin::get_list($conn, 'ORDER BY name', 0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
コード例 #28
0
            ajax_validator = new Ajax_validator(config);

            $('#send').click(function() {

                <?php 
if ($s_type == 'nmap') {
    ?>

                    if (ajax_validator.check_form() == true)
                    {
                        var target_counter = get_target_number();

                        if (target_counter > 256)
                        {
                            var msg_confirm = '<?php 
    echo Util::js_entities(_("You are about to schedule a target with a big number of assets (#ASSETS# assets). This scan could take a long time depending on your network and the number of assets that are up, are you sure you want to continue?"));
    ?>
';

                            msg_confirm = msg_confirm.replace("#ASSETS#", target_counter);

                            var keys = {"yes": "<?php 
    echo _('Yes');
    ?>
","no": "<?php 
    echo _('No');
    ?>
"};

                            av_confirm(msg_confirm, keys).fail(function(){
                                return false;
コード例 #29
0
    							 * the tree.
    							 */								
    							if(node.data.isEngine)
    							{
    								//sourceNode.move(node, 'child');
    								if(reorder_ctx(sourceNode.data.key, sourceNode.parent.data.key, node.data.key))
    									node.tree.reload();							
    							}
    						}
    					}
    				});
				
    				$(document).on('click', '.del_eng', function(){
    				
    					if (confirm('<?php 
        echo Util::js_entities(_('You are going to delete a correlation engine. This action can not be undone. Are you sure you want to continue?'));
        ?>
')) 
    					{
    						var engine = $(this).data('id');
    						
    						$.ajax({
    							type: "POST",
    							url: "engine_ajax.php",
    							data: {"action": 4, "data": {"engine": engine}},
    							dataType: "json",
    							async:false,
    							success: function(data) {
    								if(!data.error)
    								{
    									var tree = $("#tree").dynatree("getTree");
コード例 #30
0
		}
	
	
		function format_date(val){
		
			if(val < 10)
				return '0'+val;
			else
				return val;
		
		}
		function manual_addto (what,val)
		{
			if (fnValidateIPAddress(val)) {
				if (confirm('<?php 
echo Util::js_entities(_("Do you want to add it to the Asset Database?"));
?>
')) {
					document.getElementById('inventory_loading_'+what).innerHTML = "<img src='../pixmaps/loading.gif' width='20'>";
					$.ajax({
						type: "GET",
						url: "newhost_response.php?host="+val+"&ctx="+ctx,
						data: "",
						dataType:'json',
						success: function(data) {
							document.getElementById('inventory_loading_'+what).innerHTML = "";
							if(data.error){
								alert(data.msg);								
							}else{
								deletevaluefrom(what,'ANY','00000000000000000000000000000000');
								addto(what, data.txt, 'host_'+data.id, true);