Changeset 2208

Show
Ignore:
Timestamp:
08/04/08 08:04:04 (4 months ago)
Author:
mbr
Message:

updated to allow the /usr/bin/whois path to override a non-existant /usr/bin/whois_psad path (i.e. the normal system whois client will be used

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • psad/trunk/psad

    r2202 r2208  
    604604&get_local_ips(); 
    605605 
    606 ### disable whois lookups if for some reason the whois client that is 
    607 ### bundled with psad can't be found 
    608 unless ($no_whois) { 
    609     unless (defined $cmds{'whois'} 
    610             and -x $cmds{'whois'}) {  ### we couldn't find whois_psad 
    611         warn '[-] Could not locate whois_psad binary.  ', 
    612             "Disabling whois lookups.\n"; 
    613         $no_whois = 1; 
    614     } 
    615 } 
    616  
    617606### daemonize psad unless running with --no-daemon or an 
    618607### analysis mode 
     
    95219510sub check_commands() { 
    95229511    my $exceptions_hr = shift; 
     9512 
     9513    if ($no_whois) { 
     9514        $exceptions_hr->{'whois'} = ''; 
     9515    } else { 
     9516        unless (defined $cmds{'whois'} 
     9517                and -x $cmds{'whois'}) { 
     9518            ### try setting to normal /usr/bin/whois path, and let 
     9519            ### the code below work out the correct path if necessary 
     9520            $cmds{'whois'} = '/usr/bin/whois'; 
     9521        } 
     9522    } 
     9523 
    95239524    my @path = qw( 
    95249525        /bin 
     
    95649565        } 
    95659566    } 
     9567 
     9568    unless ($no_whois) { 
     9569        ### disable whois lookups if a suitable whois client could not 
     9570        ### be found. 
     9571        unless (defined $cmds{'whois'} 
     9572                and -x $cmds{'whois'}) {  ### we couldn't find whois_psad 
     9573            warn '[-] Could not locate whois binary, ', 
     9574                "disabling whois lookups.\n"; 
     9575            $no_whois = 1; 
     9576        } 
     9577    } 
     9578 
    95669579    return; 
    95679580}