Because of some excess zeal on my part, I was overwriting, rather
than appending to the existing file.
Face Palm!
23 or 24 to get your own local copies.
A 'set/debug badip' will show you what is being blocked.
+3. Fix set/badip so that it appends new IP addresses correctly.
10Jan23=======================================================================
1. Add baddx on incoming callsign in RBN.
2. Search for all /spider/local_data/badip.* files to allow more control on
my $count = @added;
my $list = join ' ', @in;
DXCIDR::clean_prep();
+#$DB::single = 1;
DXCIDR::append($suffix, @added);
push @out, "set/badip: added $count entries to badip.$suffix : $list" if $count;
return (1, @out);
if ($suffix) {
my $fn = _fn() . ".$suffix";
- my $r = rand;
- my $fh = IO::File->new (">>$fn.$r");
- if ($fh) {
+ my $fh = IO::File->new;
+ if ($fh->open("$fn", "a+")) {
+ $fh->seek(0, 2); # belt and braces !!
print $fh "$_\n" for @in;
$fh->close;
- move "$fn.$r", $fn;
} else {
- LogDbg('err', "DXCIDR::append error appending to $fn.$r $!");
+ LogDbg('err', "DXCIDR::append error appending to $fn $!");
}
} else {
LogDbg('err', "DXCIDR::append require badip suffix");