Share list passwords with a php script: a possible solution
22 May
2003
22 May
'03
7:20 a.m.
Greetings, I'm here again to share my solution with the list
I solved my fuss with the following perl-suid script:
-------------- code snippet --------------------- #!/usr/bin/perl
$ENV{PATH} = '';
if ($ARGV[0] =~ /(\w{1}\w*)/) { $list = $1; } else { nok(); }
if ($ARGV[1] =~ /(\w{1}[\w-.]*)\@([\w-.]+)/) { $email = "$1\@$2"; } else { nok(); }
$pass = $ARGV[2];
$o = /usr/local/mailman/bin/withlist -q -r getmemberpw $list $email
;
chomp($o);
if ($pass eq $o) { print "OK\n"; } else { nok(); }
sub nok() { print "NOK"; exit(); }
Cleaning up the eventual taint on the arguments, I call this script with exec() function in PHP, getting the output as a return code. The script is setuid to mailman.
Thanks for your attention
Marco Fagiolini
7893
Age (days ago)
7893
Last active (days ago)
0 comments
1 participants
participants (1)
-
OXullo Intersecans