Changeset 312


Ignore:
Timestamp:
02/04/2010 02:30:58 PM (3 years ago)
Author:
sullo
Message:

Warn if RFIURL is undefined

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/CHANGES.txt

    r310 r312  
    112010-02-04 
    22        - Match plugin names case-insensitive 
     3        - Warn if RFIURL is undefined 
    342010-01-20 Nikto 2.1.1 
    45        - Ticket 117: Fixed SKIPPORTS 
  • trunk/plugins/nikto_core.plugin

    r309 r312  
    680680        $VARIABLES{'@RFIURL'} = $NIKTOCONFIG{'RFIURL'}; 
    681681        } 
     682 else { 
     683        nprint("- ***** RFIURL is not defined in nikto.conf, which means no RFI tests will run *****");  
     684        } 
    682685  
    683686 # SSL Test 
    684  if (!LW2::ssl_is_available()) { nprint("- ***** SSL support not available (see docs for SSL install instructions) *****"); } 
     687 if (!LW2::ssl_is_available()) {  
     688        nprint("- ***** SSL support not available (see docs for SSL install instructions) *****");  
     689        } 
    685690  
    686691 # Notices 
     
    716721   if ($ident =~ /[^0-9\.]/)   # not an IP, assume name 
    717722   { 
    718       if ($CLI{'skiplookup'}) 
    719       { 
    720          nprint("+ ERROR: -skiplookup set, but given name\n"); 
    721          exit; 
    722       } 
     723      if ($CLI{'skiplookup'}) { 
     724        print("+ ERROR: -skiplookup set, but given name\n"); 
     725        exit; 
     726        } 
    723727      $ip=gethostbyname($ident); 
    724728      if (($ip eq "") && ($request{'whisker'}->{'proxy_host'} ne ""))    # can't resolve name to IP, but using proxy 
     
    753757 
    754758      $ip=$ident; 
    755       if (!$CLI{'skiplookup'})  
    756       { 
    757          use IO::Socket; 
    758          my $temp_ip=inet_aton($ip); 
    759          $name=gethostbyaddr($temp_ip,AF_INET);  
    760          # check reverse dns to avoid an inet_aton error 
    761          my $rdnsip=gethostbyname($name); 
    762          if ($rdnsip ne "") 
    763          { 
    764             $rdnsip=inet_ntoa($rdnsip); 
    765             if ($ip ne $rdnsip) { $name=$ip; }  # Reverse DNS does not match 
    766          } 
    767          else { $name = $ip; }  # Reverse DNS does not exist 
     759      if (!$CLI{'skiplookup'}) { 
     760        use IO::Socket; 
     761        my $temp_ip=inet_aton($ip); 
     762        $name=gethostbyaddr($temp_ip,AF_INET);  
     763        # check reverse dns to avoid an inet_aton error 
     764        my $rdnsip=gethostbyname($name); 
     765        if ($rdnsip ne "") { 
     766                $rdnsip=inet_ntoa($rdnsip); 
     767                if ($ip ne $rdnsip) { $name=$ip; }  # Reverse DNS does not match 
     768                } 
     769        else { $name = $ip; }  # Reverse DNS does not exist 
    768770      } 
    769771      if ($name eq "") { $name=$ip; } 
Note: See TracChangeset for help on using the changeset viewer.