Changeset 1081

Show
Ignore:
Timestamp:
05/28/08 08:15:48 (6 months ago)
Author:
mbr
Message:

updated to allow --NAT-access to not be specified if --NAT-local is used, minor bugfix for exiting if the symmetric key is not long enough

Files:

Legend:

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

    r1080 r1081  
    327327} 
    328328 
     329if ($NAT_local and not $NAT_access_str) { 
     330    $NAT_access_str = "$knock_dst,55000"; 
     331    print 
     332"[-] Requesting NAT support for port 55,000; use --NAT-rand-port for a\n", 
     333"    random port.\n"; 
     334} 
     335 
    329336&validate_access_str() if $access_str; 
    330337&validate_NAT_access_str() if $NAT_access_str; 
    331338 
    332339if (lc($server_mode) eq 'pcap' or lc($server_mode) eq 'knock') { 
    333     die "[*] Must also specify: -D <knock destination>\n" 
     340    die "[*] Must also specify: -D <destination>\n" 
    334341        unless $knock_dst; 
    335342 
     
    12261233                    last KEY; 
    12271234                } else { 
    1228                     print "\n[-] The symmetric key must be at least ", 
     1235                    die "\n[-] The symmetric key must be at least ", 
    12291236                        "8 characters long.\n"; 
    12301237                } 
     
    15681575 
    15691576    if ($NAT_rand_port) { 
     1577 
     1578        $NAT_access_str =~ s/,\d+$//; 
     1579        $NAT_access_str =~ s/:\d+$//; 
     1580 
    15701581        unless ($NAT_access_str =~ /^$ip_re$/) { 
    15711582            die "[*] Must specify '<internal_IP>'";