/[docman2]/contrib/finger2htusers.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /contrib/finger2htusers.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Oct 30 18:38:42 2003 UTC (17 years, 1 month ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/plain
added finger2htusers.pl which replaces email2htusers.pl from docman 1.x

1 dpavlin 1.1 #!/usr/bin/perl -w
2    
3     # 2003-10-30 Dobrica Pavlinusic <dpavlin@rot13.org>
4     #
5     # fingers server and allows to add users to .htusers file with
6     # auth_pop3 for user authentification
7     #
8     # uses Net::Finger from CPAN
9     #
10     # usage:
11     #
12     # finger2htusers.pl something@server >> .htusers
13     #
14    
15     use strict;
16     use Net::Finger;
17    
18    
19     if (! @ARGV) {
20     print "usage: $0 something\@server >> .htusers\n";
21     exit 1;
22     }
23    
24     print "# finger2htuser.pl start of output on ",scalar localtime(time),"\n";
25    
26     foreach my $addr (@ARGV) {
27     my @lines = finger($addr);
28     my ($f_what,$f_server) = split(/@/,$addr);
29     $f_server="localhost" if (! $f_server);
30     foreach (@lines) {
31     if (m/Login:\s*(\S+)\s+Name:\s*(.+)\s*$/i) {
32     my ($login,$name) = ($1,$2);
33     print "$login:$name:auth_pop3:$login\@$f_server\n";
34     }
35     }
36     }
37    
38     exit;

  ViewVC Help
Powered by ViewVC 1.1.26