X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Fbadip.pl;fp=cmd%2Fshow%2Fbadip.pl;h=73db65da76df80e96329a8b84b21035844f9263a;hb=cc49b8f8c2ec3a975c7ace3f5bd8679580288406;hp=0000000000000000000000000000000000000000;hpb=b84cf84a242ce805eef4b5406bacb9016274243d;p=spider.git 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);