@@ -229,9 +229,8 @@ function PrintPortscanEvents($db, $ip)
229
229
</TABLE> ' ;
230
230
}
231
231
232
- function PrintEventsByIP ($ db , $ ip )
233
- {
234
- GLOBAL $ debug_mode ;
232
+ function PrintEventsByIP ( $ db , $ ip ){
233
+ GLOBAL $ debug_mode ;
235
234
236
235
if (!isset ($ ip ))
237
236
{
@@ -287,16 +286,16 @@ function PrintEventsByIP($db, $ip)
287
286
{
288
287
SQLTraceLog (__FILE__ . ": " . __LINE__ . ": " . __FUNCTION__ . ": After BuildSigByID() " );
289
288
}
290
- $ tmp_iplookup = 'base_qry_main.php?new=1 ' .
291
- '&sig%5B0%5D=%3D&sig%5B1%5D= ' .( rawurlencode ( GetSignatureName ( $ unique_events [ $ i ], $ db ))).
292
- ' &num_result_rows=-1 ' .
293
- '&submit= ' . _QUERYDBP . ' &current_view= -1&ip_addr_cnt=2 ' .
294
- BuildIPFormVars ( $ ip );
295
-
296
- $ tmp_sensor_lookup = 'base_stat_sensor.php? ' .
297
- 'sig%5B0%5D=%3D&sig%5B1%5D= ' .
298
- ( rawurlencode ($ unique_events [$ i ])).
299
- '&ip_addr_cnt=2 ' . BuildIPFormVars ($ ip );
289
+ $ tmp_iplookup = 'base_qry_main.php?new=1 '
290
+ . '&sig%5B0%5D=%3D&sig%5B1%5D= '
291
+ . rawurlencode ( GetSignatureName ( $ unique_events [ $ i ], $ db ))
292
+ . '&num_result_rows= -1&submit= '
293
+ . _QUERYDBP . ' &current_view=-1&ip_addr_cnt=2 '
294
+ . BuildIPFormVar ( $ ip , 3 );
295
+ $ tmp_sensor_lookup = 'base_stat_sensor.php? '
296
+ . 'sig%5B0%5D=%3D&sig%5B1%5D= '
297
+ . rawurlencode ($ unique_events [$ i ])
298
+ . '&ip_addr_cnt=2 ' . BuildIPFormVar ($ ip, 3 );
300
299
301
300
echo " <TD align='center'> <A HREF= \"$ tmp_iplookup \"> $ total</A> " ;
302
301
echo " <TD align='center'> <A HREF= \"$ tmp_sensor_lookup \"> $ num_sensors</A> " ;
@@ -305,33 +304,29 @@ function PrintEventsByIP($db, $ip)
305
304
echo '</TR> ' ;
306
305
}
307
306
308
- echo " </TABLE> \n" ;
307
+ PrintFramedBoxFooter ( 0 , 2 ) ;
309
308
}
310
309
310
+ $ Sep = ' | ' ; // Separator.
311
311
if ( sizeof ($ sig ) != 0 && strstr ($ sig [1 ], "spp_portscan " ) )
312
312
$ sig [1 ] = "" ;
313
313
314
- /* Build new link for criteria-based sensor page
315
-
316
- */
317
- $ tmp_sensor_lookup = 'base_stat_sensor.php?ip_addr_cnt=2 ' .
318
- BuildIPFormVars ($ ip );
314
+ // Build new link for criteria-based sensor page - ALS <[email protected] >
315
+ $ tmp_sensor_lookup = 'base_stat_sensor.php?ip_addr_cnt=2 '
316
+ . BuildIPFormVar ($ ip , 3 );
319
317
318
+ $ tmp_srcdst_iplookup = 'base_qry_main.php?new=2&num_result_rows=-1 '
319
+ . '&submit= ' . _QUERYDBP . '&current_view=-1&ip_addr_cnt=2 '
320
+ . BuildIPFormVar ($ ip , 3 );
320
321
321
- $ tmp_srcdst_iplookup = 'base_qry_main.php?new=2 ' .
322
- '&num_result_rows=-1 ' .
323
- '&submit= ' ._QUERYDBP .'&current_view=-1&ip_addr_cnt=2 ' .
324
- BuildIPFormVars ($ ip );
322
+ $ tmp_src_iplookup = 'base_qry_main.php?new=2&num_result_rows=-1 '
323
+ . '&submit= ' . _QUERYDBP . '&current_view=-1&ip_addr_cnt=1 '
324
+ . BuildIPFormVar ($ ip , 1 );
325
325
326
- $ tmp_src_iplookup = 'base_qry_main.php?new=2 ' .
327
- '&num_result_rows=-1 ' .
328
- '&submit= ' ._QUERYDBP .'&current_view=-1&ip_addr_cnt=1 ' .
329
- BuildSrcIPFormVars ($ ip );
326
+ $ tmp_dst_iplookup = 'base_qry_main.php?new=2&num_result_rows=-1 '
327
+ . '&submit= ' . _QUERYDBP . '&current_view=-1&ip_addr_cnt=1 '
328
+ . BuildIPFormVar ($ ip , 2 );
330
329
331
- $ tmp_dst_iplookup = 'base_qry_main.php?new=2 ' .
332
- '&num_result_rows=-1 ' .
333
- '&submit= ' ._QUERYDBP .'&current_view=-1&ip_addr_cnt=1 ' .
334
- BuildDstIPFormVars ($ ip );
335
330
echo '<CENTER> ' ;
336
331
printf ("<FONT> " ._PSALLALERTSAS .":</FONT> " ,$ ip ,$ netmask );
337
332
echo '
@@ -351,25 +346,39 @@ function PrintEventsByIP($db, $ip)
351
346
<A HREF="http://www.db.ripe.net/whois?query= ' .$ ip .'" target="_NEW">RIPE</A> |
352
347
<A HREF="http://wq.apnic.net/apnic-bin/whois.pl?do_search=Search&searchtext= ' .$ ip .'" target="_NEW">APNIC</A> |
353
348
<A HREF="http://lacnic.net/cgi-bin/lacnic/whois?lg=EN&query= ' .$ ip .'" target="_NEW">LACNIC</A><BR></FONT> ' ;
354
- // Have no idea why this code is here.
355
- // Commenting it out as it was ccontributing to Issue #5
356
- // $octet=preg_split("/\./", $ip);
357
- // $classc=sprintf("%03s.%03s.%03s",$octet[0],$octet[1],$octet[2]);
358
- print '<FONT> ' ._PSEXTERNAL .': ' ;
359
- if (isset ($ external_dns_link )){
360
- print '<A HREF=" ' .$ external_dns_link .$ ip .'" target="_NEW">DNS</A> ' ;
361
- }
362
- if (isset ($ external_whois_link )){
363
- print ' | <A HREF=" ' .$ external_whois_link .$ ip .'" target="_NEW">whois</A> ' ;
364
- }
365
- if (isset ($ external_all_link )){
366
- print ' | <A HREF=" ' .$ external_all_link .$ ip .'" target="_NEW">Extended whois</A> ' ;
367
- }
368
- print ' | <A HREF="http://www.dshield.org/ipinfo.php?ip= ' .$ ip .'&Submit=Submit" target="_NEW">DShield.org IP Info</A> | ' .
369
- '<A HREF="http://www.trustedsource.org/query.php?q= ' .$ ip .'" target="_NEW">TrustedSource.org IP Info</A> | ' .
370
- '<A HREF="http://isc.sans.org/ipinfo.html?ip= ' .$ ip .'" target="_NEW">ISC Source/Subnet Report</A><BR> </FONT> ' ;
349
+ // Have no idea why this code is here.
350
+ // Commenting it out as it was ccontributing to Issue #5
351
+ // $octet=preg_split("/\./", $ip);
352
+ // $classc=sprintf("%03s.%03s.%03s",$octet[0],$octet[1],$octet[2]);
353
+ print _PSEXTERNAL . ': ' ;
354
+ if ( isset ($ external_dns_link ) ){
355
+ NLIO (
356
+ "<a href=' " . $ external_dns_link . $ ip
357
+ . "' target='_NEW'>DNS</a> $ Sep " , 2
358
+ );
359
+ }
360
+ if ( isset ($ external_whois_link ) ){
361
+ NLIO (
362
+ "<a href=' " . $ external_whois_link . $ ip
363
+ . "' target='_NEW'>whois</a> $ Sep " , 2
364
+ );
365
+ }
366
+ if ( isset ($ external_all_link ) ){
367
+ NLIO (
368
+ "<a href=' " . $ external_all_link . $ ip
369
+ . "' target='_NEW'>Extended whois</a> $ Sep " , 2
370
+ );
371
+ }
372
+ NLIO (
373
+ "<a href=' " . 'https://www.dshield.org/ipinfo.html?ip= ' . $ ip
374
+ . "' target='_NEW'>DShield.org IP Info</a> $ Sep " , 2
375
+ );
376
+ NLIO (
377
+ "<a href=' " . 'https://isc.sans.edu/ipinfo.html?ip= ' . $ ip
378
+ . "' target='_NEW'>ISC Source/Subnet Report</a> " , 2
379
+ );
380
+ NLIO ('<br/> ' );
371
381
372
-
373
382
echo '</CENTER> ' ;
374
383
echo '<HR> ' ;
375
384
@@ -472,6 +481,6 @@ function PrintEventsByIP($db, $ip)
472
481
PrintPortscanEvents ($ db , $ ip );
473
482
echo ' </CENTER> ' ;
474
483
}
475
- NLIO ('</form> ' ,2 );
484
+ NLIO ('</form> ' , 2 );
476
485
PrintBASESubFooter ();
477
486
?>
0 commit comments