Changeset 76


Ignore:
Timestamp:
09/09/25 13:32:40 (5 days ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

Minor QoL refinement on first stage of adding an IP; extract the first
IP-like string from the input

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/dnsbl.cgi

    r73 r76  
    9595  $page->param(dnsblsiteroot => $dnsblsiteroot);
    9696
    97   $webvar{ip} =~ s/^\s*//;
    98   $webvar{ip} =~ s/\s*$//;
     97  ($webvar{ip}) = ($webvar{ip} =~ /(\d+\.\d+\.\d+\.\d+)/);
     98#  $webvar{ip} =~ s/^\s*//;
     99#  $webvar{ip} =~ s/\s*$//;
    99100  $page->param(ip => $webvar{ip});
    100101
     
    146147  my $err = '';
    147148
    148   $webvar{ip} =~ s/^\s*//;
    149   $webvar{ip} =~ s/\s*$//;
     149  ($webvar{ip}) = ($webvar{ip} =~ /(\d+\.\d+\.\d+\.\d+)/);
     150#  $webvar{ip} =~ s/^\s*//;
     151#  $webvar{ip} =~ s/\s*$//;
    150152
    151153  # basic algo:  for each listing level, add the org and block if not already present.
Note: See TracChangeset for help on using the changeset viewer.