Thread: [Secureideas-cvs] base-php4 base_graph_display.php, 1.34, 1.35 base_qry_common.php, 1.44, 1.45 base
Brought to you by:
secureideas,
sinukas
From: Will U. <si...@us...> - 2010-06-18 19:32:38
|
Update of /cvsroot/secureideas/base-php4 In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv25698 Modified Files: base_graph_display.php base_qry_common.php base_qry_sqlcalls.php base_stat_ipaddr.php Log Message: php 5.3 patch (3009648/ohauer) Index: base_graph_display.php =================================================================== RCS file: /cvsroot/secureideas/base-php4/base_graph_display.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- base_graph_display.php 29 Dec 2009 07:37:42 -0000 1.34 +++ base_graph_display.php 18 Jun 2010 19:32:30 -0000 1.35 @@ -320,27 +320,27 @@ // special case '"I0" => "private network (rfc 1918)"' and // '"** (private network) " => "private network (rfc 1918)"' - if (ereg("rfc 1918", $tmp, $substring) || (ereg("[*][*] \(private network\) ", $tmp_lower, $substring))) + if (preg_match("/rfc 1918/", $tmp, $substring) || (preg_match("/[*][*] \(private network\) /", $tmp_lower, $substring))) { $Dataset->addPoint("private network (rfc 1918)", $xdata[$i][1]); } // special case '?? (Not Found) ' => 'unknown' - elseif(ereg("[?][?][ \t]+\(Not Found\)[ \t]*", $tmp, $substring)) + elseif(preg_match("/[?][?][ \t]+\(Not Found\)[ \t]*/", $tmp, $substring)) { $Dataset->addPoint("unknown", $xdata[$i][1]); } // anything inside parentheses, following a 2-letter TLD: - elseif (ereg("^[-a-zA-Z0-9]{2}[ \t]\((.+)\)[ \t]*$", $tmp, $substring)) + elseif (preg_match("/^[-a-zA-Z0-9]{2}[ \t]\((.+)\)[ \t]*$/", $tmp, $substring)) { $Dataset->addPoint($substring[1], $xdata[$i][1]); } // anything after two-letter top level domain names and after one space or tab: - elseif (ereg("[ \t]*[-a-zA-Z0-9]{2}[ \t]([-a-zA-Z0-9]+[-a-zA-Z0-9 ]*)", $tmp, $substring)) + elseif (preg_match("/[ \t]*[-a-zA-Z0-9]{2}[ \t]([-a-zA-Z0-9]+[-a-zA-Z0-9 ]*)/", $tmp, $substring)) { $Dataset->addPoint($substring[1], $xdata[$i][1]); } // two-letter top level domain names right at the beginning: - elseif (ereg("[ \t]*([-a-zA-Z0-9]{2})[ \t]", $tmp_lower, $substring)) + elseif (preg_match("/[ \t]*([-a-zA-Z0-9]{2})[ \t]/", $tmp_lower, $substring)) { $Dataset->addPoint($substring[1], $xdata[$i][1]); } Index: base_qry_common.php =================================================================== RCS file: /cvsroot/secureideas/base-php4/base_qry_common.php,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- base_qry_common.php 2 Aug 2009 13:49:54 -0000 1.44 +++ base_qry_common.php 18 Jun 2010 19:32:30 -0000 1.45 @@ -773,10 +773,10 @@ } } /* if have chosen the address type to be both source and destination */ - if ( ereg("ip_both", $tmp) ) + if ( preg_match("/ip_both/", $tmp) ) { - $tmp_src = ereg_replace("ip_both","ip_src",$tmp); - $tmp_dst = ereg_replace("ip_both","ip_dst",$tmp); + $tmp_src = preg_replace("/ip_both/","ip_src",$tmp); + $tmp_dst = preg_replace("/ip_both/","ip_dst",$tmp); if ( $ip_addr[$i][2] == '=' ) $tmp = "(".$tmp_src.') OR ('.$tmp_dst.')'; Index: base_stat_ipaddr.php =================================================================== RCS file: /cvsroot/secureideas/base-php4/base_stat_ipaddr.php,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- base_stat_ipaddr.php 4 Jul 2009 02:25:08 -0000 1.34 +++ base_stat_ipaddr.php 18 Jun 2010 19:32:30 -0000 1.35 @@ -135,7 +135,7 @@ print "</PRE><BR>\n"; */ - if(ereg($ip, $contents)) { + if(preg_match("/$ip/", $contents)) { $total++; if( $total % 2 == 0 ) { $color="DDDDDD"; @@ -143,7 +143,7 @@ $color="FFFFFF"; } - $contents = ereg_replace(" ", " ", $contents); + $contents = preg_replace("/ /", " ", $contents); $elements = explode(" ", $contents); echo '<tr bgcolor="'.$color.'"><td align="center">'. @@ -183,7 +183,7 @@ print "</PRE></TD>"; /* - ereg("([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)",$elements[3],$store); + preg_match("/([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)/",$elements[3],$store); $source_ip = $store[1]; $source_port = $store[2]; if (empty($source_ip)) @@ -197,7 +197,7 @@ echo '<td align="center">' . $source_ip . '</td>'; echo '<td align="center">' . $source_port . '</td>'; - ereg("([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)",$elements[5],$store); + preg_match("/([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)/",$elements[5],$store); $destination_ip = $store[1]; $destination_port = $store[2]; if (empty($destination_ip)) Index: base_qry_sqlcalls.php =================================================================== RCS file: /cvsroot/secureideas/base-php4/base_qry_sqlcalls.php,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- base_qry_sqlcalls.php 31 May 2009 02:05:36 -0000 1.26 +++ base_qry_sqlcalls.php 18 Jun 2010 19:32:30 -0000 1.27 @@ -259,9 +259,9 @@ $line = split (" ", $current_sig_txt); foreach ($line as $ps_element) { - if ( ereg("[0-9]*\.[0-9]*\.[0-9]*\.[0-9]", $ps_element) ) + if ( preg_match("/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]/", $ps_element) ) { - $ps_element = ereg_replace (":", "", $ps_element); + $ps_element = preg_replace ("/:/", "", $ps_element); qroPrintEntry("<A HREF=\"base_stat_ipaddr.php?ip=".$ps_element."&netmask=32\">". $ps_element."</A>"); } |