]> dxcluster.org Git - spider.git/commitdiff
add set/var and show/var - two rather insecure commands!
authordjk <djk>
Mon, 15 Nov 1999 14:06:39 +0000 (14:06 +0000)
committerdjk <djk>
Mon, 15 Nov 1999 14:06:39 +0000 (14:06 +0000)
Changes
cmd/connect.pl
cmd/set/var.pl [new file with mode: 0644]
cmd/show/var.pl [new file with mode: 0644]
perl/DXProt.pm
perl/cluster.pl

diff --git a/Changes b/Changes
index 19a866ec560fef976051179630349d972a82bd59..e6271715c724c99e7da7192ed19793e639df4d94 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+14Nov99=======================================================================
+1. added BBS.pm to start BBS input of mail
+2. fixed eval in DXUser to log errors rather than banging out
 12Nov99=======================================================================
 1. added sh/sun command kindly supplied by Steve K9AN.
 2. allow ^Z on its own on a line to terminate a message
index 14f94bb3e4a93c31924091dc7b4b500dac28ff6f..d4a11d2ab7b03fb8c3eb15dc8ac8c71b9cccbcce 100644 (file)
@@ -22,6 +22,7 @@ if (defined $pid) {
                eval "{ package DB; sub DB {} }";
                alarm(0);
                DXChannel::closeall();
+               Msg::close_server();
                $SIG{CHLD} = $SIG{TERM} = $SIG{INT} = $SIG{__WARN__} = 'DEFAULT';
                exec $prog, $call, 'connect';
        } else {
diff --git a/cmd/set/var.pl b/cmd/set/var.pl
new file mode 100644 (file)
index 0000000..1870d1a
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# set any variable
+#
+# Rape me!
+#
+# Copyright (c) 1999 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd;
+my ($var, $rest) = split /\s+/, $line, 2;
+$rest =~ s/^=\s*//;
+Log('DXCommand', $self->call . " set $var = $rest" );
+eval "$var = $rest";
+return (1, $@ ? $@ : "Ok, $var = $rest" );
+
+
+
+               
diff --git a/cmd/show/var.pl b/cmd/show/var.pl
new file mode 100644 (file)
index 0000000..7f73558
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# show any variable
+#
+# Rape me!
+#
+# Copyright (c) 1999 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+return (1, $self->msg('e5')) if $self->priv < 9 || $self->remotecmd;
+my @f = split /\s+/, $line;
+my $f;
+my @out;
+
+foreach $f (@f) {
+    print "\$f = $f\n";
+       my $var = eval "$f";
+       if ($var) {
+        my $s = Data::Dumper->Dump([ $var ], [ "$f" ]);
+               push @out, $s;
+               Log('DXCommand', $self->call . " show/var $s");
+       } else {
+               push @out, $@ ? $@ : $self->msg('e3', 'show/var', $f);
+               Log('DXCommand', $self->call . " show/var $f not found" );
+       }
+}
+
+return (1, @out);
index d467a5d5b7866880ce5886a4449ea3d33f36d46a..234c7bcae3c58cedeaaf2b31549d30f786b1d546 100644 (file)
@@ -41,7 +41,7 @@ $pc23_max_age = 1*3600;                       # the maximum age for an incoming 'real-time' pc23
 $pc11_dup_age = 24*3600;               # the maximum time to keep the spot dup list for
 $pc23_dup_age = 24*3600;               # the maximum time to keep the wwv dup list for
 $pc12_dup_age = 12*3600;               # the maximum time to keep the ann dup list for
-$pc12_dup_lth = 72;                            # the length of ANN text to save for deduping 
+$pc12_dup_lth = 60;                            # the length of ANN text to save for deduping 
 %spotdup = ();                             # the pc11 and 26 dup hash 
 %wwvdup = ();                              # the pc23 and 27 dup hash
 %anndup = ();                               # the PC12 dup hash
index 0ed98e55b39ddd33926ec6dbcd8e3aa670b080f2..0e93c4e9fc1c1e250df2d43e99aa4d5abb972a2d 100755 (executable)
@@ -60,6 +60,8 @@ use CmdAlias;
 use Filter;
 use Local;
 use DXDb;
+use Data::Dumper;
+
 use Fcntl ':flock'; 
 
 use Carp qw(cluck);