Location: PHPKode > projects > SnortCenter 2.x > snortcenter-release/edit_spp.php
<?php
    /*
    ** SnortCenter Copyright (C) 2001,2002,2003 Stefan Dens
    **
    ** Author: Stefan Dens <hide@address.com>
    **
    ** This program is free software; you can redistribute it and/or modify
    ** it under the terms of the GNU General Public License as published by
    ** the Free Software Foundation; either version 2 of the License, or
    ** (at your option) any later version.
    **
    ** This program is distributed in the hope that it will be useful,
        ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ** GNU General Public License for more details.
    **
    ** You should have received a copy of the GNU General Public License
    ** along with this program; if not, write to the Free Software
    ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    */
?>
<?php
    include("config.php");
     
    $db = NewACIDDBConnection($DBlib_path, $DBtype);
    $db->acidConnect($DB_dbname, $DB_host, $DB_port, $DB_user, $DB_password);
     

     
    if ($spp_name == "http_decode:") {
        $spp_value = $ports . ' ' . $unicode . ' ' . $iis_alt_unicode . ' ' . $double_encode . ' ' . $iis_flip_slash . ' ' . $full_whitespace;
    }
    elseif ($spp_name == "rpc_decode:") {
        $spp_value = $ports;
    }
    elseif (($spp_name == "telnet_decode:") || ($spp_name == "telnet_decode")) {
        $spp_value = $ports;
        if (!$ports) {
            $spp_name = 'telnet_decode';
        } else {
            $spp_name = 'telnet_decode:';
        }
    }
    elseif ($spp_name == "asn1_decode:") {
        $spp_value = '';
    }
    elseif ($spp_name == "bo:") {
        $spp_value = $nobrute . ' ' . $bo_key;
    }
    elseif (($spp_name == "frag2:") || ($spp_name == "frag2")) {
        $spp_value = '';
        if ($timeout) {
            $spp_value = 'timeout ' . $timeout . ', ';
        }
        if ($memcap) {
            $spp_value  .= 'memcap ' . $memcap . ', ';
        }
        if ($min_ttl) {
            $spp_value  .= 'min_ttl ' . $min_ttl . ', ';
        }
        if ($ttl_limit) {
            $spp_value  .= 'ttl_limit ' . $ttl_limit . ', ';
        }
        if ($spp_value == '') {
            $spp_name = 'frag2';
        } else {
            $spp_name = 'frag2:';
            $spp_value = substr(rtrim($spp_value), 0, -1);
        } // strip last ","
    }
    elseif (($spp_name == "spade:") || ($spp_name == "spade")) {
        $spp_value = '';
        if ($dest) {
           $spp_value .= 'dest=' . $dest . ' ';
        }
        if ($adjdest) {
           $spp_value .= 'adjdest=' . $adjdest . ' ';
        }
        if ($logfile) {
           $spp_value .= 'logfile=' . $logfile . ' ';
        }
        if ($statefile) {
           $spp_value .= 'statefile=' . $statefile . ' ';
        }
        if ($cpfreq) {
           $spp_value .= 'cpfreq=' . $cpfreq . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade';
        } else {
            $spp_name = 'spade:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-homenet:") || ($spp_name == "spade-homenet")) {
        $spp_value = '';
        if ($homenet) {
           $spp_value .= $homenet;
        }
        if ($spp_value == '') {
            $spp_value = "any";
        } else {
            $spp_value = trim($spp_value);
        } // strip " "
        $spp_name = 'spade-homenet:';
    }
    elseif (($spp_name == "spade-detect:") || ($spp_name == "spade-detect")) {
        $spp_value = '';
        if ($type) {
           $spp_value .= 'type=' . $type . ' ';
        }
        if ($to) {
           $spp_value .= 'to=' . $to . ' ';
        }
        if ($from) {
           $spp_value .= 'from=' . $from . ' ';
        }
        if ($proto) {
           $spp_value .= 'proto=' . $proto . ' ';
        }
        if ($tcpflags) {
           $spp_value .= 'tcpflags=' . $tcpflags . ' ';
        }
        if ($icmptype) {
           $spp_value .= 'icmptype=' . $icmtype . ' ';
        }
        if ($thresh) {
           $spp_value .= 'thresh=' . $thresh . ' ';
        }
        if ($wait) {
           $spp_value .= 'wait=' . $wait . ' ';
        }
        if ($Xdips) {
           $spp_value .= 'Xdips=' . $Xdips . ' ';
        }
        if ($Xdports) {
           $spp_value .= 'Xdports=' . $Xdports . ' ';
        }
        if ($Xsips) {
           $spp_value .= 'Xsips=' . $Xsips . ' ';
        }
        if ($Xsports) {
           $spp_value .= 'Xsports=' . $Xsports . ' ';
        }
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($revwaitrpt) {
           $spp_value .= 'recwaitrpt=' . $recwaitrpt . ' ';
        }
        if ($scalefreq) {
           $spp_value .= 'scalefreq=' . $scalefreq . ' ';
        }
        if ($scalefactor) {
           $spp_value .= 'scalefactor=' . $scalefactor . ' ';
        }
        if ($scalehalflife) {
           $spp_value .= 'scalehalflife=' . $scalehalflife . ' ';
        }
        if ($scalecutoff) {
           $spp_value .= 'scalecutoff=' . $scalecutoff . ' ';
        }
        if ($relscore) {
           $spp_value .= 'relscore=' . $relscore . ' ';
        }
        if ($corrscore) {
           $spp_value .= 'corrscore=' . $corrscore . ' ';
        }
        if ($probmode) {
           $spp_value .= 'probmode=' . $probmode . ' ';
        }
        if ($maxentropy) {
           $spp_value .= 'maxentropy=' . $maxentropy . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-detect';
        } else {
            $spp_name = 'spade-detect:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-adapt:") || ($spp_name == "spade-adapt")) {
        $spp_value = '';
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($target) {
           $spp_value .= 'target=' . $target . ' ';
        }
        if ($obsper) {
           $spp_value .= 'obsper=' . $obsper . ' ';
        }
        if ($newweight) {
           $spp_value .= 'newweight=' . $newweight . ' ';
        }
        if ($bycount) {
           $spp_value .= 'bycount=' . $bycount . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-adapt';
        } else {
            $spp_name = 'spade-adapt:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-adapt2:") || ($spp_name == "spade-adapt2")) {
        $spp_value = '';
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($target) {
           $spp_value .= 'target=' . $target . ' ';
        }
        if ($obsper) {
           $spp_value .= 'obsper=' . $obsper . ' ';
        }
        if ($NS) {
           $spp_value .= 'NS=' . $NS . ' ';
        }
        if ($NM) {
           $spp_value .= 'NM=' . $NM . ' ';
        }
        if ($NL) {
           $spp_value .= 'NL=' . $NL . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-adapt2';
        } else {
            $spp_name = 'spade-adapt2:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-adapt3:") || ($spp_name == "spade-adapt3")) {
        $spp_value = '';
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($target) {
           $spp_value .= 'target=' . $target . ' ';
        }
        if ($obsper) {
           $spp_value .= 'obsper=' . $obsper . ' ';
        }
        if ($numper) {
           $spp_value .= 'numper=' . $numper . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-adapt3';
        } else {
            $spp_name = 'spade-adapt3:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-threshadvise:") || ($spp_name == "spade-threshadvise")) {
        $spp_value = '';
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($target) {
           $spp_value .= 'target=' . $target . ' ';
        }
        if ($obsper) {
           $spp_value .= 'obsper=' . $obsper . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-threshadvise';
        } else {
            $spp_name = 'spade-threshadvise:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-survey:") || ($spp_name == "spade-survey")) {
        $spp_value = '';
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($surveyfile) {
           $spp_value .= 'surveyfile=' . $surveyfile . ' ';
        }
        if ($interval) {
           $spp_value .= 'interval=' . $interval . ' ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-survey';
        } else {
            $spp_name = 'spade-survey:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "spade-stats:") || ($spp_name == "spade-stats")) {
        $spp_value = '';
        if ($label) {
           $spp_value .= 'id=' . $label . ' ';
        }
        if ($entropy) {
           $spp_value .= 'entropy ';
        }
        if ($uncondprob) {
           $spp_value .= 'uncondprob ';
        }
        if ($condprob) {
           $spp_value .= 'condprob ';
        }
        if ($spp_value == '') {
            $spp_name = 'spade-stats';
        } else {
            $spp_name = 'spade-stats:';
            $spp_value = trim($spp_value);
        } // strip " "
    }
    elseif (($spp_name == "stream4:") || ($spp_name == "stream4")) {
        $spp_value = '';
        if ($detect_scans) {
            $spp_value = 'detect_scans, ';
        }
        if ($detect_state_problems) {
            $spp_value  .= 'detect_state_problems, ';
        }
        if ($disable_evasion_alerts) {
            $spp_value  .= 'disable_evasion_alerts, ';
        }
        if ($keepstats) {
            $spp_value  .= 'keepstats ' . $keepstats . ', ';
        }
        if ($noinspect) {
            $spp_value  .= 'noinspect, ';
        }
        if ($timeout) {
            $spp_value  .= 'timeout ' . $timeout . ', ';
        }
        if ($memcap) {
            $spp_value  .= 'memcap ' . $memcap . ', ';
        }
        if ($min_ttl) {
            $spp_value  .= 'min_ttl ' . $min_ttl . ', ';
        }
        if ($ttl_limit) {
            $spp_value  .= 'ttl_limit ' . $ttl_limit . ', ';
        }
        if ($log_flushed_streams) {
            $spp_value  .= 'log_flushed_streams, ';
        }
         
        if ($spp_value == '') {
            $spp_name = 'stream4';
        } else {
            $spp_name = 'stream4:';
            $spp_value = substr(rtrim($spp_value), 0, -1);
        } // strip last ","
    }
    elseif (($spp_name == "stream4_reassemble:") || ($spp_name == "stream4_reassemble")) {
        $spp_value = '';
        if ($both) {
            $spp_value  .= 'both, ';
        }
        elseif ($clientonly) {
            $spp_value  .= 'clientonly, ';
        }
        elseif ($serveronly) {
            $spp_value  .= 'serveronly, ';
        }
        if ($noalerts) {
            $spp_value  .= 'noalerts, ';
        }
        if ($ports) {
            $spp_value  .= 'ports ' . $ports . ', ';
        }
         
        if ($spp_value == '') {
            $spp_name = 'stream4_reassemble';
        } else {
            $spp_name = 'stream4_reassemble:';
            $spp_value = substr(rtrim($spp_value), 0, -1);
        } // strip last ","
    }
    elseif ($spp_name == "portscan:") {
        $spp_value = '';
        if ($do  != 'Select') {
            if (!$network) {
                $network = 'any';
            }
            if (!$nr_ports) {
                $nr_ports = '4';
            }
            if (!$period) {
                $period = '3';
            }
            if (!$path) {
                $path = 'portscan.log';
            }
            $spp_value = "$network $nr_ports $period $path";
        }
    }
    elseif ($spp_name == "portscan-ignorehosts:") {
        $spp_value = $hosts;
    }
    elseif (($spp_name == "conversation:") || ($spp_name == "conversation")) {
        $spp_value = '';
        if ($allowed_ip_protocols) {
            $spp_value = 'allowed_ip_protocols ' . $allowed_ip_protocols . ', ';
        }
        if ($timeout) {
            $spp_value  .= 'timeout ' . $timeout . ', ';
        }
        if ($max_conversations) {
            $spp_value  .= 'max_conversations ' . $max_conversations . ', ';
        }
        if ($alert_odd_protocols) {
            $spp_value  .= 'alert_odd_protocols, ';
        }
         
        if ($spp_value == '') {
            $spp_name = 'conversation';
        } else {
            $spp_name = 'conversation:';
            $spp_value = substr(rtrim($spp_value), 0, -1);
        } // strip last ","
    }
    elseif (($spp_name == "portscan2:") || ($spp_name == "portscan2")) {
        $spp_value = '';
        if ($scanners_max) {
            $spp_value = 'scanners_max ' . $scanners_max . ', ';
        }
        if ($targets_max) {
            $spp_value  .= 'targets_max ' . $targets_max . ', ';
        }
        if ($target_limit) {
            $spp_value  .= 'target_limit ' . $target_limit . ', ';
        }
        if ($port_limit) {
            $spp_value  .= 'port_limit ' . $port_limit . ', ';
        }
        if ($timeout) {
            $spp_value  .= 'timeout ' . $timeout . ', ';
        }
        if ($log) {
            $spp_value  .= 'log ' . $log . ', ';
        }
         
        if ($spp_value == '') {
            $spp_name = 'portscan2';
        } else {
            $spp_name = 'portscan2:';
            $spp_value = substr(rtrim($spp_value), 0, -1);
        } // strip last ","
    }
    elseif ($spp_name == "portscan2-ignorehosts:") {
        $spp_value = $hosts;
    }
     
     
    if (($do == "Duplicate") || ($do == "Save")) {
        $result = $db->acidExecute("INSERT INTO preprocessor (spp_name, spp_value) VALUES ('$spp_name', '$spp_value')");
        $result = $db->acidExecute("SELECT max(id) FROM preprocessor");
        $myrow = $result->acidFetchRow();
        $result->acidFreeRows();
        $id = $myrow[0];
	echo '<SCRIPT language=javascript>setTimeout("location.href=\'spp.php?sensor_id='.$sensor_id.'\'",0);</SCRIPT>';
    }
     
    if ($do == "Update") {
        $result = $db->acidExecute("UPDATE preprocessor SET spp_name='$spp_name', spp_value='$spp_value' where id='$id'");
        $result->acidFreeRows();
	echo '<SCRIPT language=javascript>setTimeout("location.href=\'spp.php?sensor_id='.$sensor_id.'\'",0);</SCRIPT>';
    }
     
    if (($spp  != "new") && ($do  != 'Select')) {
        $result = $db->acidExecute("SELECT id, spp_name, spp_value  FROM preprocessor where id='$id'");
        $myrow = $result->acidFetchRow();
        $result->acidFreeRows();
        list($id, $spp_name, $spp_value) = $myrow;
    }
    include('top.inc.php');
    echo "<BR>";
    echo "<FORM method=GET>";
     
    if ($spp_name == "http_decode:") {
        if (strpos($spp_value, "iis_alt_unicode")  !== false) {
            $iis_alt_unicode_select = 'CHECKED';
            $spp_value = str_replace("iis_alt_unicode", '', $spp_value);
        }
        if (strpos($spp_value, "unicode")  !== false) {
            $unicode_select = 'CHECKED';
            $spp_value = str_replace("unicode", '', $spp_value);
        }
        if (strpos($spp_value, "double_encode")  !== false) {
            $double_encode_select = 'CHECKED';
            $spp_value = str_replace("double_encode", '', $spp_value);
        }
        if (strpos($spp_value, "iis_flip_slash")  !== false) {
            $iis_flip_slash_select = 'CHECKED';
            $spp_value = str_replace("iis_flip_slash", '', $spp_value);
        }
        if (strpos($spp_value, "full_whitespace")  !== false) {
            $full_whitespace_select = 'CHECKED';
            $spp_value = str_replace("full_whitespace", '', $spp_value);
        }
        $ports = trim($spp_value);
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>HTTP Decode:</B> $lang[128]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[129]</TD><TD><INPUT NAME=ports TYPE=TEXT value='$ports' size='60'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[131]</TD><TD><INPUT NAME=unicode TYPE=CHECKBOX value='unicode' $unicode_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[250]</TD><TD><INPUT NAME=iis_alt_unicode TYPE=CHECKBOX value='iis_alt_unicode' $iis_alt_unicode_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[251]</TD><TD><INPUT NAME=double_encode TYPE=CHECKBOX value='double_encode' $double_encode_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[252]</TD><TD><INPUT NAME=iis_flip_slash TYPE=CHECKBOX value='iis_flip_slash' $iis_flip_slash_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[253]</TD><TD><INPUT NAME=full_whitespace TYPE=CHECKBOX value='full_whitespace' $full_whitespace_select></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif ($spp_name == "rpc_decode:") {
        $ports = trim($spp_value);
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>RPC Decode:</B> $lang[133]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[134]</TD><TD><INPUT NAME=ports TYPE=TEXT value='$ports' size='60'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "bo:") || ($spp_name == "bo")) {
        if (strpos($spp_value, "-nobrute")  !== false) {
            $nobrute_select = 'CHECKED';
            $spp_value = str_replace("-nobrute", '', $spp_value);
        }
        $bo_key = trim($spp_value);
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=40%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>BO:</B> $lang[135]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[136]</TD><TD><INPUT NAME=bo_key TYPE=TEXT value='$bo_key' size='10'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[137]</TD><TD><INPUT NAME=nobrute TYPE=CHECKBOX value='-nobrute' $nobrute_select></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "frag2:") || ($spp_name == "frag2")) {
        $foo = explode(',', trim($spp_value));
        foreach($foo as $i) {
            if (strpos($i, "timeout")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $timeout = trim($foo1[1]);
            }
            if (strpos($i, "memcap")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $memcap = trim($foo1[1]);
            }
            if (strpos($i, "min_ttl")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $min_ttl = trim($foo1[1]);
            }
            if (strpos($i, "ttl_limit")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $ttl_limit = trim($foo1[1]);
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=30%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Frag2:</B> $lang[138]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[139]</TD><TD><INPUT NAME=timeout TYPE=TEXT value='$timeout' size='15'> (sec)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[140]</TD><TD><INPUT NAME=memcap TYPE=TEXT value='$memcap' size='15'> (bytes <16000)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[248]</TD><TD><INPUT NAME=min_ttl TYPE=TEXT value='$min_ttl' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[249]</TD><TD><INPUT NAME=ttl_limit TYPE=TEXT value='$ttl_limit' size='15'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "spade:") || ($spp_name == "spade")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "logfile") {
                $logfile = $val;
            }
            if ($opt == "statefile") {
                $statefile = $val;
            }
            if ($opt == "cpfreq") {
                $cpfreq = $val;
            }
            if ($opt == "dest") {
                $dest = $val;
            }
            if ($opt == "adjdest") {
                $adjdest = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[322]</TD><TD><SELECT NAME=dest>\n";
        $foo = explode (' ', "alert log both");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $dest ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[323]</TD><TD><SELECT NAME=adjdest>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "none alert log both");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $adjdest ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[319]</TD><TD><INPUT NAME=logfile TYPE=TEXT value='$logfile'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[320]</TD><TD><INPUT NAME=statefile TYPE=TEXT value='$statefile'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[321]</TD><TD><INPUT NAME=cpfreq TYPE=TEXT value='$cpfreq'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "spade-homenet:") || ($spp_name == "spade-homenet")) {
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[324]</TD><TD><INPUT NAME=homenet TYPE=TEXT value='$spp_value'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "spade-detect:") || ($spp_name == "spade-detect")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "type") {
                $type = $val;
            }
            if ($opt == "to") {
                $to = $val;
            }
            if ($opt == "from") {
                $from = $val;
            }
            if ($opt == "proto") {
                $proto = $val;
            }
            if ($opt == "tcpflags") {
                $tcpflags = $val;
            }
            if ($opt == "icmptype") {
                $icmptype = $val;
            }
            if ($opt == "thresh") {
                $thresh = $val;
            }
            if ($opt == "wait") {
                $wait = $val;
            }
            if ($opt == "Xdips") {
                $Xdips = $val;
            }
            if ($opt == "Xdports") {
                $Xdports = $val;
            }
            if ($opt == "Xsips") {
                $Xsipd = $val;
            }
            if ($opt == "Xsports") {
                $Xsports = $val;
            }
            if ($opt == "id") {
                $label = $val;
            }
            if ($opt == "revwaitrpt") {
                $revwaitrpt = $val;
            }
            if ($opt == "scalefreq") {
                $scalefreq = $val;
            }
            if ($opt == "scalefactor") {
                $scalefactor = $val;
            }
            if ($opt == "scalehalflife") {
                $scalehalflife = $val;
            }
            if ($opt == "scalecutoff") {
                $scalecutoff = $val;
            }
            if ($opt == "relscore") {
                $relscore = $val;
            }
            if ($opt == "corrscore") {
                $corrscore = $val;
            }
            if ($opt == "probmode") {
                $probmode = $val;
            }
            if ($opt == "maxentropy") {
                $maxentropy = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[329]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[326]</TD><TD><SELECT NAME=type>\n";
        $foo = explode (' ', "closed-dport dead-dest odd-dport odd-typecode");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $type ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[327]</TD><TD><SELECT NAME=to>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "home nothome any");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $to ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[328]</TD><TD><SELECT NAME=from>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "home nothome any");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $from ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[330]</TD><TD><SELECT NAME=proto>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "tcp udp icmp");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $proto ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[331]</TD><TD><SELECT NAME=tcpflags>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "synonly synack setup established teardown weird");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $tcpflags ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[332]</TD><TD><SELECT NAME=icmpflags>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "all err noterr");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $icmpflags ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[333]</TD><TD><INPUT NAME=thresh TYPE=TEXT value='$thresh'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[334]</TD><TD><INPUT NAME=minobs TYPE=TEXT value='$minobs'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[335]</TD><TD><INPUT NAME=wait TYPE=TEXT value='$wait'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[336]</TD><TD><INPUT NAME=Xdips TYPE=TEXT value='$Xdips'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[337]</TD><TD><INPUT NAME=Xdports TYPE=TEXT value='$Xdports'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[338]</TD><TD><INPUT NAME=Xsips TYPE=TEXT value='$Xsips'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[339]</TD><TD><INPUT NAME=Xsports TYPE=TEXT value='$Xsports'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[340]</TD><TD><INPUT NAME=label TYPE=TEXT value='$label'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[341]</TD><TD><INPUT NAME=recwaitrpt TYPE=TEXT value='$recwaitrpt'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[342]</TD><TD><INPUT NAME=scalefreq TYPE=TEXT value='$scalefreq'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[343]</TD><TD><INPUT NAME=scalefactor TYPE=TEXT value='$scalefactor'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[344]</TD><TD><INPUT NAME=scalehalflife TYPE=TEXT value='$scalehalflife'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[345]</TD><TD><INPUT NAME=scalecutoff TYPE=TEXT value='$scalecutoff'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[346]</TD><TD><SELECT NAME=relscore>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "on off");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $relscore ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[347]</TD><TD><SELECT NAME=corrscore>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "on off");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $corrscore ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[348]</TD><TD><SELECT NAME=probmode>\n";
        echo "<OPTION value=''></OPTION>\n";
        $foo = explode (' ', "0 1 2 3");
        foreach ($foo as $i) {
            echo "<OPTION value=$i";
            if ( $i == $probmode ) echo " SELECTED";
            echo ">$i</OPTION>\n";
        }
        echo "</SELECT></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[349]</TD><TD><INPUT NAME=maxentropy TYPE=TEXT value='$maxentropy'></TD></TR>";
 
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "spade-adapt:") || ($spp_name == "spade-adapt")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "id") {
                $label = $val;
            }
            if ($opt == "target") {
                $target = $val;
            }
            if ($opt == "obsper") {
                $obsper = $val;
            }
            if ($opt == "newweight") {
                $newweight = $val;
            }
            if ($opt == "bycount") {
                $bycount = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[350]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[340]</TD><TD><INPUT NAME=label TYPE=TEXT value='$label'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[351]</TD><TD><INPUT NAME=target TYPE=TEXT value='$target'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[352]</TD><TD><INPUT NAME=obsper TYPE=TEXT value='$obsper'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[353]</TD><TD><INPUT NAME=newweight TYPE=TEXT value='$newweight'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[354]</TD><TD><INPUT NAME=bycount TYPE=TEXT value='$bycount'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    } 
    elseif (($spp_name == "spade-adapt2:") || ($spp_name == "spade-adapt2")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "id") {
                $label = $val;
            }
            if ($opt == "target") {
                $target = $val;
            }
            if ($opt == "obsper") {
                $obsper = $val;
            }
            if ($opt == "NS") {
                $NS = $val;
            }
            if ($opt == "NM") {
                $NM = $val;
            }
            if ($opt == "NL") {
                $NL = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[350]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[340]</TD><TD><INPUT NAME=label TYPE=TEXT value='$label'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[351]</TD><TD><INPUT NAME=target TYPE=TEXT value='$target'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[352]</TD><TD><INPUT NAME=obsper TYPE=TEXT value='$obsper'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[362]</TD><TD><INPUT NAME=NS TYPE=TEXT value='$NS'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[363]</TD><TD><INPUT NAME=NM TYPE=TEXT value='$NM'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[364]</TD><TD><INPUT NAME=NL TYPE=TEXT value='$NL'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    } 
    elseif (($spp_name == "spade-adapt3:") || ($spp_name == "spade-adapt3")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "id") {
                $label = $val;
            }
            if ($opt == "target") {
                $target = $val;
            }
            if ($opt == "obsper") {
                $obsper = $val;
            }
            if ($opt == "numper") {
                $numper = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[350]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[340]</TD><TD><INPUT NAME=label TYPE=TEXT value='$label'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[351]</TD><TD><INPUT NAME=target TYPE=TEXT value='$target'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[352]</TD><TD><INPUT NAME=obsper TYPE=TEXT value='$obsper'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[365]</TD><TD><INPUT NAME=numper TYPE=TEXT value='$numper'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    } 
    elseif (($spp_name == "spade-threshadvise:") || ($spp_name == "spade-threshadvise")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "id") {
                $label = $val;
            }
            if ($opt == "target") {
                $target = $val;
            }
            if ($opt == "obsper") {
                $obsper = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[366]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[340]</TD><TD><INPUT NAME=label TYPE=TEXT value='$label'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[351]</TD><TD><INPUT NAME=target TYPE=TEXT value='$target'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[352]</TD><TD><INPUT NAME=obsper TYPE=TEXT value='$obsper'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    } 
    elseif (($spp_name == "spade-survey:") || ($spp_name == "spade-survey")) {
        $foo = explode(' ', trim($spp_value));
        foreach($foo as $i) {
            list($opt, $val) = explode('=', trim($i));
            if ($opt == "id") {
                $label = $val;
            }
            if ($opt == "surveyfile") {
                $surveyfile = $val;
            }
            if ($opt == "interval") {
                $interval = $val;
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[367]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[340]</TD><TD><INPUT NAME=label TYPE=TEXT value='$label'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[368]</TD><TD><INPUT NAME=surveyfile TYPE=TEXT value='$surveyfile'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[369]</TD><TD><INPUT NAME=interval TYPE=TEXT value='$interval'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    } 
    elseif (($spp_name == "spade-stats:") || ($spp_name == "spade-stats")) {
        $foo = explode(' ', trim($spp_value));
        if (strpos($spp_value, "entropy")  !== false) {
            $entropy_select = 'CHECKED';
        }
        if (strpos($spp_value, "uncondprob")  !== false) {
            $uncondprob_select = 'CHECKED';
            $spp_value = str_replace("uncondprob", '', $spp_value);
        }
        if (strpos($spp_value, "condprob")  !== false) {
            $condprob_select = 'CHECKED';
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>SPADE $lang[370]:</B> $lang[318]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[371]</TD><TD><INPUT NAME=entropy TYPE=CHECKBOX value='entropy' $entropy_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[372]</TD><TD><INPUT NAME=uncondprob TYPE=CHECKBOX value='uncondprob' $uncondprob_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[373]</TD><TD><INPUT NAME=condprob TYPE=CHECKBOX value='condprob' $condprob_select></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    } 
    elseif (($spp_name == "stream4:") || ($spp_name == "stream4")) {
        $foo = explode(',', trim($spp_value));
        foreach($foo as $i) {
            if (strpos($i, "detect_scans")  !== false) {
                $detect_scans_select = 'CHECKED';
            }
            if (strpos($i, "detect_state_problems")  !== false) {
                $detect_state_problems_select = 'CHECKED';
            }
            if (strpos($i, "disable_evasion_alerts")  !== false) {
                $disable_evasion_alerts_select = 'CHECKED';
            }
            if (strpos($i, "keepstats")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $keepstats = trim($foo1[1]);
            }
            if (strpos($i, "noinspect")  !== false) {
                $noinspect_select = 'CHECKED';
            }
            if (strpos($i, "timeout")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $timeout = trim($foo1[1]);
            }
            if (strpos($i, "memcap")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $memcap = trim($foo1[1]);
            }
            if (strpos($i, "min_ttl")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $min_ttl = trim($foo1[1]);
            }
            if (strpos($i, "ttl_limit")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $ttl_limit = trim($foo1[1]);
            }
            if (strpos($i, "log_flushed_streams")  !== false) {
                $log_flushed_streams_select = 'CHECKED';
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Stream4:</B> $lang[141]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[142]</TD><TD><INPUT NAME=detect_scans TYPE=CHECKBOX value='detect_scans' $detect_scans_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[143]</TD><TD><INPUT NAME=detect_state_problems TYPE=CHECKBOX value='detect_state_problems' $detect_state_problems_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[144]</TD><TD><INPUT NAME=disable_evasion_alerts TYPE=CHECKBOX value='disable_evasion_alerts' $disable_evasion_alerts_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[145]</TD><TD><INPUT NAME=noinspect TYPE=CHECKBOX value='noinspect' $noinspect_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[146]</TD><TD><INPUT NAME=log_flushed_streams TYPE=CHECKBOX value='log_flushed_streams' $log_flushed_streams_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[147]</TD><TD><INPUT NAME=keepstats TYPE=TEXT value='$keepstats' size='15'> [machine | binary]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[139]</TD><TD><INPUT NAME=timeout TYPE=TEXT value='$timeout' size='15'> (sec)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[140]</TD><TD><INPUT NAME=memcap TYPE=TEXT value='$memcap' size='15'> (bytes <16000)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[248]</TD><TD><INPUT NAME=min_ttl TYPE=TEXT value='$min_ttl' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[249]</TD><TD><INPUT NAME=ttl_limit TYPE=TEXT value='$ttl_limit' size='15'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "stream4_reassemble:") || ($spp_name == "stream4_reassemble")) {
        $foo = explode(',', trim($spp_value));
        foreach($foo as $i) {
            if (strpos($i, "clientonly")  !== false) {
                $clientonly_select = 'CHECKED';
            }
            if (strpos($i, "serveronly")  !== false) {
                $serveronly_select = 'CHECKED';
            }
            if (strpos($i, "both")  !== false) {
                $both_select = 'CHECKED';
            }
            if (strpos($i, "noalerts")  !== false) {
                $noalerts_select = 'CHECKED';
            }
             
            if (strpos($i, "ports")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $ports = trim($foo1[1]);
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=55%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Stream4_reassemble:</B> $lang[148]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[149]</TD><TD><INPUT NAME=clientonly TYPE=CHECKBOX value='clientonly' $clientonly_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[150]</TD><TD><INPUT NAME=serveronly TYPE=CHECKBOX value='serveronly' $serveronly_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[151]</TD><TD><INPUT NAME=both TYPE=CHECKBOX value='both' $both_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[152]</TD><TD><INPUT NAME=noalerts TYPE=CHECKBOX value='noalerts' $noalerts_select></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[129]</TD><TD><INPUT NAME=ports TYPE=TEXT value='$ports' size='25'> [21 23 80 | all | default]</TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif ($spp_name == "portscan:") {
        list($network, $nr_ports, $period, $path) = explode(' ', trim($spp_value));
         
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=55%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Portscan:</B> $lang[153]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[154]</TD><TD><INPUT NAME=network TYPE=TEXT value='$network' size='45'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[155]</TD><TD><INPUT NAME=nr_ports TYPE=TEXT value='$nr_ports' size='5'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[156]</TD><TD><INPUT NAME=period TYPE=TEXT value='$period' size='5'> (sec)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[157]</TD><TD><INPUT NAME=path TYPE=TEXT value='$path' size='45'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif ($spp_name == "portscan-ignorehosts:") {
        $hosts = trim($spp_value);
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=60%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Portscan-ignorehosts:</B> $lang[158]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[159]</TD><TD><INPUT NAME=hosts TYPE=TEXT value='$hosts' size='75'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "telnet_decode") || ($spp_name == "telnet_decode:")) {
        $ports = trim($spp_value);
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>$spp_name</B> $lang[164]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>Port List</TD><TD><INPUT NAME=ports TYPE=TEXT value='$ports' size='60'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "conversation:") || ($spp_name == "conversation")) {
        $foo = explode(',', trim($spp_value));
        foreach($foo as $i) {
            if (strpos($i, "allowed_ip_protocols")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $allowed_ip_protocols = trim($foo1[1]);
            }
            if (strpos($i, "timeout")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $timeout = trim($foo1[1]);
            }
            if (strpos($i, "max_conversations")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $max_conversations = trim($foo1[1]);
            }
            if (strpos($i, "alert_odd_protocols")  !== false) {
                $alert_odd_protocols_select = 'CHECKED';
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Conversation:</B> $lang[254]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[255]</TD><TD><INPUT NAME=allowed_ip_protocols TYPE=TEXT value='$allowed_ip_protocols' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[139]</TD><TD><INPUT NAME=timeout TYPE=TEXT value='$timeout' size='15'> (sec)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[256]</TD><TD><INPUT NAME=max_conversations TYPE=TEXT value='$max_conversations' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[257]</TD><TD><INPUT NAME=alert_odd_protocols TYPE=CHECKBOX value='alert_odd_protocols' $alert_odd_protocols_select></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif (($spp_name == "portscan2:") || ($spp_name == "portscan2")) {
        $foo = explode(',', trim($spp_value));
        foreach($foo as $i) {
            if (strpos($i, "scanners_max")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $scanners_max = trim($foo1[1]);
            }
            if (strpos($i, "targets_max")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $targets_max = trim($foo1[1]);
            }
            if (strpos($i, "target_limit")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $target_limit = trim($foo1[1]);
            }
            if (strpos($i, "port_limit")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $port_limit = trim($foo1[1]);
            }
            if (strpos($i, "timeout")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $timeout = trim($foo1[1]);
            }
            if (strpos($i, "log")  !== false) {
                $foo1 = explode(' ', trim($i), 2);
                $log = trim($foo1[1]);
            }
        }
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=50%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Portscan2:</B> $lang[258]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[259]</TD><TD><INPUT NAME=scanners_max TYPE=TEXT value='$scanners_max' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[260]</TD><TD><INPUT NAME=targets_max TYPE=TEXT value='$targets_max' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[261]</TD><TD><INPUT NAME=target_limit TYPE=TEXT value='$target_limit' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[262]</TD><TD><INPUT NAME=port_limit TYPE=TEXT value='$port_limit' size='15'></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[139]</TD><TD><INPUT NAME=timeout TYPE=TEXT value='$timeout' size='15'> (sec)</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[263]</TD><TD><INPUT NAME=log TYPE=TEXT value='$log' size='15'> (log directory)</TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif ($spp_name == "portscan2-ignorehosts:") {
        $hosts = trim($spp_value);
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=60%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>Portscan2-ignorehosts:</B> $lang[158]</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left>$lang[159]</TD><TD><INPUT NAME=hosts TYPE=TEXT value='$hosts' size='75'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
    elseif ($spp_name == "asn1_decode") {
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=40%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>$spp_name</B></TD></TR>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<TR bgcolor=#DDDDDD><TD>&nbsp;</TD></TR><TR bgcolor=#DDDDDD><TD align=center>$lang[160]</TD></TR><TR bgcolor=#DDDDDD><TD>&nbsp;</TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
     
    elseif ($spp  != "new") {
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<INPUT TYPE=HIDDEN NAME='spp_name' VALUE='$spp_name'>";
        echo "<INPUT TYPE=HIDDEN name=id value=$id>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=60%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=left colspan=2><B>$lang[161]:</B> $lang[162] !!!</TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD align=left><INPUT NAME=spp_name TYPE=TEXT value='$spp_name'></TD><TD><INPUT NAME=spp_value TYPE=TEXT value='$spp_value' size='75'></TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
    }
     
    if ($do == 'Select') {
        echo "<CENTER><INPUT NAME='do' VALUE='Save' TYPE=SUBMIT>&nbsp;<INPUT VALUE='Reset' TYPE=RESET></CENTER>";
    }
    elseif (($spp  != "new") && ($spp_name  != "asn1_decode")) {
        echo "<CENTER><INPUT NAME='do' VALUE='Update' TYPE=SUBMIT>&nbsp;<INPUT NAME='do' VALUE='Duplicate' TYPE=SUBMIT>&nbsp;<INPUT VALUE='Reset' TYPE=RESET></CENTER>";
    }
    elseif ($spp == "new") {
        echo "<INPUT TYPE=HIDDEN NAME='sensor_id' VALUE='$sensor_id'>";
        echo "<table align=center border=0 cellspacing=0 cellpadding=0 width=40%><tr>";
        # -------- Begin left table --------------
        echo "<TD width=48% valign=top>";
        echo "<table align=center border=0 cellpadding=1 cellspacing=0 width=100%><tr bgcolor=#f9f890><td>";
        echo "<table style=\"font-size:12px; font-family: Verdana;\" align=center border=0 cellspacing=0 cellpadding=0 width=100%>";
         
        echo "<TR><TD align=center colspan=2><B>$lang[163]</B></TD></TR>";
        echo "<TR bgcolor=#DDDDDD><TD>&nbsp;</TD></TR><TR bgcolor=#DDDDDD><TD align=center>
            <SELECT name=spp_name>
            <OPTION value='bo:'>BO ($lang[135])</OPTION>
            <OPTION value='frag2:'>Frag2 ($lang[138])</OPTION>
            <OPTION value='http_decode:'>HTTP_Decode ($lang[128])</OPTION>
	    <OPTION value='portscan:'>PortScan ($lang[153])</OPTION>
            <OPTION value='portscan-ignorehosts:'>Portscan-ignorehosts ($lang[158])</OPTION>
            <OPTION value='rpc_decode:'>RPC Decode ($lang[133])</OPTION>
            <OPTION value='spade'>Spade ($lang[318])</OPTION>
            <OPTION value='spade-homenet'>Spade-Homenet ($lang[325])</OPTION>
            <OPTION value='spade-detect'>Spade-Detector ($lang[355])</OPTION>
            <OPTION value='spade-adapt'>Spade-Threshold-Adapting ($lang[356])</OPTION>
            <OPTION value='spade-adapt2'>Spade-Threshold-Adapting 2 ($lang[357])</OPTION>
            <OPTION value='spade-adapt3'>Spade-Threshold-Adapting 3 ($lang[358])</OPTION>
            <OPTION value='spade-threshadvise'>Spade-Threshold-Advise ($lang[359])</OPTION>
            <OPTION value='spade-survey'>Spade-Survey ($lang[360])</OPTION>
            <OPTION value='spade-stats'>Spade-Stats ($lang[361])</OPTION>
            <OPTION value='stream4'>Stream4 ($lang[141])</OPTION>
            <OPTION value='stream4_reassemble'>Stream4 Reassemble ($lang[148])</OPTION>
            <OPTION value='telnet_decode:'>Telnet Decode ($lang[164])</OPTION>
            <OPTION value='asn1_decode'>ASN1 Decode</OPTION>
            <OPTION value='conversation:'>Conversation ($lang[254])</OPTION>
            <OPTION value='portscan2:'>PortScan2 ($lang[258])</OPTION>
            <OPTION value='portscan2-ignorehosts:'>Portscan2-ignorehosts ($lang[158])</OPTION>
            <OPTION value=''>-----------------------------------------------</OPTION>
            <OPTION value=''>$lang[165] $snortcenter_ver</OPTION>
            </SELECT>
            </TD></TR><TR bgcolor=#DDDDDD><TD>&nbsp;</TD></TR>";
        echo "</TABLE></TD></TR></TABLE></TD></TR></TABLE><BR>";
        echo "<CENTER><INPUT NAME='do' VALUE='Select' TYPE=SUBMIT></CENTER>";
    }
     
    echo "</FORM>";
    echo "<BR>";
    require('bottom.inc.php');
?>
Return current item: SnortCenter 2.x