X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=cmd%2Fshow%2Fbadip.pl;fp=cmd%2Fshow%2Fbadip.pl;h=73db65da76df80e96329a8b84b21035844f9263a;hp=0000000000000000000000000000000000000000;hb=f63d598af3f797b56b8d5e23ec4ff5254192eee9;hpb=66a5726687662b1a4726ac1de972340ac856ef7a diff --git a/cmd/show/badip.pl b/cmd/show/badip.pl new file mode 100644 index 00000000..73db65da --- /dev/null +++ b/cmd/show/badip.pl @@ -0,0 +1,28 @@ +# +# set list of bad dx nodes +# +# Copyright (c) 2021 - Dirk Koopman G1TLH +# +# +# +my ($self, $line) = @_; +return (1, $self->msg('e5')) if $self->remotecmd; +# are we permitted? +return (1, $self->msg('e5')) if $self->priv < 6; +my @out; +my @added; +my @in = split /\s+/, $line; +my @list= DXCIDR::list(); +foreach my $list (@list) { + if (@in) { + for (@in) { + if ($list =~ /$_/i) { + push @out, $list; + last; + } + } + } else { + push @out, $list; + } +} +return (1, @out);