File: websec

package info (click to toggle)
websec 1.8.0-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 176 kB
  • ctags: 41
  • sloc: perl: 773; makefile: 79; lisp: 16; sh: 7
file content (689 lines) | stat: -rwxr-xr-x 22,048 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
#!/usr/bin/perl -w

#################################################################################
# 
# Web Secretary Ver 1.8.0
#
# Retrieves a list of web pages and send the pages via email to
# a designated recipient. It can optionally compare the page with a
# previously retrieved page, highlight the differences and send the
# modified page to the recipient instead.
#
# Copyright (C) 1998  Chew Wei Yih
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
#################################################################################

my $feature_compress = 1;

use LWP::UserAgent;
use URI;
eval { require Compress::Zlib; } or $feature_compress=0;
use POSIX qw(strftime);
use File::Spec;
use Getopt::Long;
use Pod::Usage;
use File::Temp qw/tempfile/;

# Print introduction
print "Web Secretary Ver 1.8.0\n";
print "By Chew Wei Yih Copyleft (c) 1998\n\n";

# Initialize parameters

$help = 0;
$man  = 0;
$urllist = "url.list";
$base = "";

# Parse command line options
GetOptions(
    "urllist=s" => \$urllist,
    "help|?" => \$help,
    "man"    => \$man,
    "base=s" => \$base
);

pod2usage(1) if $help;
pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;

if ($base eq "") {
    if ( -e $urllist ) {
        $base = ".";
    } else {
        $base = $ENV{HOME} . "/.websec";
    }
}

# Remove trailing slash from base, we will add it ourself everywhere needed
$base =~ s/\/$//;

# Prepare pathnames.
$archive = "$base/archive";
mkdir $base,    0750 if !-d $base;
mkdir $archive, 0750 if !-d $archive;
($current_fh, $page_current) = tempfile(DIR=>"$base", UNLINK=>1, SUFFIX=>".html");
$current_fh=-1;

# Red Hat has sendmail in /usr/sbin/sendmail, but LWP::Protocol::mailto
# expects it in /usr/lib/sendmail.  Revert to the Red Hat location if there
# is no executable at the expected location.
use vars qw($LWP::Protocol::mailto::SENDMAIL);
$LWP::Protocol::mailto::SENDMAIL = "/usr/sbin/sendmail"
  unless -x "/usr/lib/sendmail";

# Location of webdiff, if it's in the same directory as websec, use it,
# this enables simply opening the archive and using the program inplace.
use FindBin;
$webdiffbin = "$FindBin::Bin/webdiff";
if ( !-e $webdiffbin ) {
    $webdiffbin = "webdiff";
}

$htmldiffbin = "$FindBin::Bin/htmldiff";
if ( !-e $htmldiffbin ) {
  $htmldiffbin = "./htmldiff";
  if ( !-e $htmldiffbin ) {
      $htmldiffbin = "htmldiff";
  }
}

# prepare digest
@digest = ();
@htmldigest = ();

# Set default values
local %defaults = (
    url        => "",
    auth       => "none",
    name       => "",
    prefix     => "",
    diff       => "webdiff",
    hicolor    => "blue",
    asciimarker => 0,
    ignore     => "none",
    ignoreurl  => "none",
    email      => "",
    emaillink  => "",
    emailerror => 1,
    program    => "",
    programdigest => "",
    proxy      => "",
    proxyauth  => "none",
    randomwait => 0,
    retry      => 3,
    retrywait  => 0,
    timeout    => 20,
    tmin       => 0,
    tmax       => 99999,
    addsubject => "",
    digest     => "false",
    useragent  => "WebSec/1.7",
    datefmt    => " - %d %B %Y (%a)",
    mailfrom   => "",
);
%siteinfo = %defaults;

# Default return code
$rc = 0;

open ARGV, $base . "/" . "$urllist" unless exists $ARGV[0];

# Loop through input file and process all sites listed
while (<>) {
    chop $_;
    s/^\s*//;
    s/\s*$//;

    # Ignore comments
    next if (m/^#/);
    # Stop with a finish marker
    last if (m/^__END__/);

    # Handle non-empty lines
    if ( length != 0 ) {
        $rc = &HandleInput();
        if ( $rc != 0 ) { last; }
        next;
    }

    # Handle line separators
    $rc = &HandleSite();
    if ( $rc != 0 ) { last; }
    %siteinfo = %defaults;
}

# Process last site if available
if ( $rc == 0 && $siteinfo{url} ne "" ) { $rc = &HandleSite(); }

# Delete temp files
unlink($page_current);

if (@digest) {
    $linkmsg =
      "The contents of the following URLs have changed:\n\n"
      . join ( "\n", @digest ) . "\n";
    $subj = "$addsubject$today";
    &MailMessage( $linkmsg, $subj, $digestEmail, $siteinfo{mailfrom} );
}

if (@htmldigest) {
    ($OUTPAGE, $pagename) = tempfile(DIR=>"$base", UNLINK=>1, SUFFIX=>".html");
    print OUTPAGE "<HTML><BODY>The contents of the following URLs has changed:<P><P>";
    foreach (@htmldigest) { print OUTPAGE "$_<P>\n"; }
    print OUTPAGE "<P></BODY></HTML>";
    close(OUTPAGE);

    &ShowDocument( $program, $pagename);
}


# End of main program
exit $rc;

# Handle setting of parameters
# Params: none
sub HandleInput() {

    # Get keyword, value pair
    ( $keyword, $value ) = split ( /=/, $_, 2 );
    $keyword =~ s/^\s*(.*?)\s*$/$1/;
    $keyword =~ tr/A-Z/a-z/;
    $value   =~ s/^\s*\"?(.*?)\"?\s*$/$1/;

    # Check if valid keyword
    if ( not defined $defaults{$keyword} ) {
        print qq(Unrecognized keyword in line $.: "$_". Keyword="$keyword".\n);
        return -1;
    }

    # Allow values from the environment
    while ($value =~ m/\${([^}]+)}/) {
        if (not exists $ENV{$1}) {
            print STDERR "Used environment variable '$1' but it is not defined, aborting.\n";
            exit 1;
        }
        $value =~ s/\${([^}]+)}/$ENV{$1}/;
    }

    $siteinfo{$keyword} = $value;
    return 0;
}

# Handle downloading, highlighting and mailing of each site.
# Params: none
# Returns: 0 => OK, -1 => Error
sub HandleSite() {

    # Get parameter values for this page
    $url        = $siteinfo{url};
    $name       = $siteinfo{name};
    $prefix     = $siteinfo{prefix};
    $diff       = $siteinfo{diff};
    $hicolor    = $siteinfo{hicolor};
    $ignore     = $siteinfo{ignore};
    $ignoreurl  = $siteinfo{ignoreurl};
    $email      = $siteinfo{email};
    $emailLink  = $siteinfo{emaillink};
    $program    = $siteinfo{program};
    $programdigest = $siteinfo{programdigest};
    $proxy      = $siteinfo{proxy};
    $randomwait = $siteinfo{randomwait};
    $retry      = $siteinfo{retry};
    $retrywait  = $siteinfo{retrywait};
    $timeout    = $siteinfo{timeout};
    $tmin       = $siteinfo{tmin};
    $tmax       = $siteinfo{tmax};
    $addsubject = $siteinfo{addsubject};
    $digest     = $siteinfo{digest};
    $useragent  = $siteinfo{useragent};
    $datefmt    = $siteinfo{datefmt};

    # Get today's date in the format we want.
    $today = strftime $datefmt, localtime;

    # If block without URL, assume parameter setting block and update default
    # values
    if ( $url eq "" ) {
        %defaults = %siteinfo;
        return 0;
    }

    # If essential parameters are not present, abort with error
    if ( $name eq ""
        || $prefix eq ""
        || ( $email eq "" && $emailLink eq "" && $program eq "" ) )
    {
        print "Name, prefix, program or email info missing from URL: $url.\n";
        return -1;
    }

    # Prepare for downloading this page
    print "Processing => $url ($name) ...\n";
    $pagebase            = "$archive/$prefix";
    $page_previous       = "$pagebase.html";
    $page_archive        = "$pagebase.old.html";
    $outgoing     = "$pagebase.diff.html";
    $page_previousExists = 1;
    open( FILE, $page_previous ) or $page_previousExists = 0;
    close(FILE);
    $subj    = "$addsubject $name$today - $url";
    $webdiff =
"$webdiffbin --basedir=$base --archive=$page_previous --current=$page_current --out=$outgoing "
      . "--hicolor=$hicolor --ignore=$ignore --ignoreurl=$ignoreurl --tmin=$tmin --tmax=$tmax";
     $htmldiff = "$htmldiffbin $page_previous $page_current > $outgoing";

    if ($siteinfo{asciimarker}) {
        $webdiff .= " --asciimarker";
    }

    # Download URL using LWP
    $ua = new LWP::UserAgent;
    $ua->agent($useragent);
    $ua->timeout($timeout);
    $ua->env_proxy;
    if ( $proxy ne "" ) { $ua->proxy( http => $proxy ); }
    $req = PrepareRequest($url);

    # Try up to '$retry' times to download URL
    $counter = 0;
    srand;
    while ( $counter < $retry ) {
        $resp = $ua->request($req);

        if ( ! $resp->is_success ) {
            $counter++;
            if ( $randomwait > 0 ) {
                $random = int( rand $randomwait ) + 1;
                sleep $random;
            }
            else { sleep $retrywait; }
            next;
        }

        # Leave if there is no refresh header
        if (!$resp->header("Refresh")) { last; }

        # Handle it if the refresh is for zero seconds
        ( $time, $refresh_url ) = split(/;/, $resp->header("Refresh"), 2);
        if ($time > 0) { last; }
        
        # Convert to absolute URL and refetch the page
        ( undef, $refresh_to ) = split(/=/, $refresh_url, 2);
        $newurl = URI->new_abs($refresh_to, $url)->as_string();

        $req = PrepareRequest($newurl);
        # Don't reset the counter, we still want to protect from endless loops
    }

    # If URL is successfully downloaded
    if ( $resp->is_success ) {
        # Check if the data is gzip compressed, decompress if it is.
        if (($resp->content_encoding || "") =~ /gzip/) {
            my $new_content;

            if ($feature_compress) {
                $new_content = Compress::Zlib::memGunzip($resp->content);
            } else {
                $new_content = "Server sent gzip compressed data, and we are missing Compress::Gzip";
            }
            if (defined $new_content) {
                $resp->content($new_content);
                $resp->content_length(length $new_content);
                $resp->content_encoding("");
            }
        }
    
        open( HTML_FILE, ">$page_current" );
        print HTML_FILE "<!-- X-URL: ", $resp->base, " -->\n";
        print HTML_FILE "<BASE HREF= \"", $resp->base . "\">\n";
        print HTML_FILE $resp->content;
        close HTML_FILE;

        if ( $diff eq "webdiff" ) {
            if ( $page_previousExists == 1 ) {
                print
"Highlighting differences from previous version of webpage ...\n";
                $rc = system($webdiff);
                if ( $rc != 0 ) {
                    if ( $email ne "" ) {
                        print "Sending highlighted page to $email ...\n";
                        MailDocument( $outgoing, $subj, $email,
                            $siteinfo{mailfrom} );
                    }
                    if ( $emailLink ne "" ) {
                        print "Sending link to $emailLink ...\n";
                        if ( ( $digest ne "no" ) && ( $digest ne "false" ) ) {
                            push @digest, $url;
                            ($digestEmail) or ( $digestEmail = $emailLink );
                        }
                        else {
                            my $filepath = File::Spec->rel2abs($page_previous);
                            $linkmsg =
"The contents of the following URL has changed:\n$url\n\nIt can also be found at:\nfile://$filepath\n";
                            MailMessage(
                                $linkmsg,   $subj,
                                $emailLink, $siteinfo{mailfrom}
                            );
                        }
                    }
                    if ( $program ne "" ) {
                        if ( $programdigest ne "true" ) {
                            ShowDocument( $program, $outgoing );
                        }
                        else {
                            push @htmldigest, "<A HREF=\"".$outgoing."\">Changes for ".$name."</A>".
                                    "&nbsp;<A HREF=\"".$page_archive."\">previous page</A>".
                                    "&nbsp;<A HREF=\"".$page_previous."\">current page</A>".
                                    "&nbsp;<A HREF=\"".$url."\">current page on the net</A><P><P>";
                        }
                    }
                }
                else {
                    print "No changes were detected.\n";
                }
                rename $page_previous, $page_archive;
                rename $page_current,  $page_previous;
            }
            else {
                print
                  "No previous version for this page. Storing in archive ...\n";
                rename $page_current, $page_previous;
            }
        }
        elsif ( $diff eq "htmldiff" )
        {
            if ( $page_previousExists == 1 ) {
                print
"Highlighting differences from previous version of webpage using htmldiff...\n";
                $rc = system($htmldiff);
                if ( $rc != 0 ) {
                    if ( $email ne "" ) {
                        print "Sending highlighted page to $email ...\n";
                        MailDocument( $outgoing, $subj, $email );
                    }
                    if ( $emailLink ne "" ) {
                        print "Sending link to $emailLink ...\n";
                        if ( ( $digest ne "no" ) && ( $digest ne "false" ) ) {
                            push @digest, $url;
                            ($digestEmail) or ( $digestEmail = $emailLink );
                        }
                        else {
                            my $filepath = File::Spec->rel2abs($page_previous);
                            $linkmsg =
"The contents of the following URL has changed:\n$url\n\nIt can also be found at:\nfile://$filepath\n";
                            MailMessage( $linkmsg, $subj, $emailLink );
                        }
                    }
                    if ( $program ne "" ) {
                        if ( $programdigest ne "true" ) {
                            ShowDocument( $program, $outgoing );
                        }
                        else {
                            push @htmldigest, "<A HREF=\"".$outgoing."\">Changes for ".$name."</A>".
                                    "&nbsp;<A HREF=\"".$page_archive."\">previous page</A>".
                                    "&nbsp;<A HREF=\"".$page_previous."\">current page</A>".
                                    "&nbsp;<A HREF=\"".$url."\">current page on the net</A><P><P>";
                        }
                    }
                }
                else {
                    print "No changes were detected.\n";
                }
                rename $page_previous, $page_archive;
                rename $page_current,  $page_previous;
            }
            else {
                print
                  "No previous version for this page. Storing in archive ...\n";
                rename $page_current, $page_previous;
            }
        }
        else {
            if ( $email ne "" ) {
                MailDocument( $page_current, $subj, $email,
                    $siteinfo{mailfrom} );
            }
            if ($page_previousExists) { rename $page_previous, $page_archive; }
            rename $page_current, $page_previous;
        }
    }

    # If unable to download URL
    else {
        print "Unable to retrieve page.\n";
        $errmsg =
          "Unable to retrieve $name ($url).\n\n"
          . "Detailed error as follows:\n"
          . $resp->error_as_HTML;

        if ( $email ne "" && $siteinfo{emailerror} ) {
            MailMessage( $errmsg, $subj, $email, $siteinfo{mailfrom} );
        }
        if ( $emailLink ne "" && $siteinfo{emailerror} ) {
            if ( ( $digest ne "no" ) && ( $digest ne "false" ) ) {
                push @digest, "Unable to retrieve: $url";
                ($digestEmail) or ( $digestEmail = $emailLink );
            }
            else {
                MailMessage( $errmsg, $subj, $emailLink, $siteinfo{mailfrom} );
            }
        }
    }

    return 0;
}

sub PrepareRequest() {
    my $url = shift (@_);

    $req = new HTTP::Request( 'GET', $url );

    my $auth = $siteinfo{auth};
    if ( $auth ne "none" ) { $req->authorization_basic( split ( /:/, $auth, 2 ) ); }

    my $proxyAuth = $siteinfo{proxyauth};
    if ( $proxyAuth ne "none" ) { $req->proxy_authorization_basic( split ( /:/, $proxyAuth, 2 ) ); }
    
    #$req->push_header("Accept" => "text/html, text/plain, text/*, */*");
    
    my $compress_options = "identity";
    if ($feature_compress) { $compress_options = "gzip, $compress_options"; }
    $req->push_header("Accept-Encoding" => $compress_options);

    return $req;
}

# Mail message
# Params: message, subject, recipient
# Returns: none
sub MailMessage() {
    my $message    = shift (@_);
    my $subject    = shift (@_);
    my @recipients = split /,/, shift (@_);
    my $from       = shift (@_);

    foreach $email (@recipients) {
        $req = HTTP::Request->new( POST => "mailto:" . $email );
        if ( $from ne "" ) {
            $req->header( "From",   $from );
            $req->header( "Sender", $from );
        }
        $req->header( "Subject",      $subject );
        $req->header( "Content-type", "text/plain; charset=us-ascii" );
        $req->header( "Content-Transfer-Encoding", "7bit" );
        $req->header( "MIME-Version",              "1.0" );
        $req->content($message);

        $ua = new LWP::UserAgent;
        $ua->request($req);
    }
}

# Mail HTML document.
# Params: filename, subject, recipient
# Returns: none
sub MailDocument() {
    my $filename   = shift (@_);
    my $subject    = shift (@_);
    my @recipients = split /,/, shift (@_);
    my $from       = shift (@_);
    my $tmpstr     = $/;

    undef $/;
    open( FILE, "$filename" ) or die "Cannot open $filename: $!\n";
    my $content = <FILE>;
    close(FILE);

    foreach $email (@recipients) {
        $req = HTTP::Request->new( POST => "mailto:" . $email );
        if ( $from ne "" ) {
            $req->header( "From",   $from );
            $req->header( "Sender", $from );
        }
        $req->header( "Subject",                   $subject );
        $req->header( "Content-type",              "text/html" );
        $req->header( "Content-Transfer-Encoding", "7bit" );
        $req->header( "MIME-Version",              "1.0" );
        $req->content($content);

        $ua = new LWP::UserAgent;
        my $resp = $ua->request($req);
        die "Error mailing document: ".$resp->message()."\n" if $resp->is_error;
    }

    $/ = $tmpstr;
}

sub ShowDocument() {
    my ( $program, $outgoing ) = @_;
    my $status;

    # special handling for mozilla, try to use remoting...
    if ( $program eq "mozilla" ) {
        $status = system("mozilla -remote \"ping()\"");

        # print "Status after ping: ".$status."\n";

# if ping() returns ne 0, mozilla is not running, we cannot use openurl()
        if ( $status ne 0 ) {
            $status = system( "mozilla", $outgoing );
            if ( $status ne 0 ) {
                print "Running mozilla returned status: " . $status . "\n";
            }
        }
        else {
            $status =
              system(
                "mozilla -remote \"openurl(file:" . $outgoing . ",new-tab)\"" );
            if ( $status ne 0 ) {
                print "Running mozilla returned status: " . $status . "\n";
            }
        }
    }
    elsif ($program eq "konqueror") {
        # konqueror from KDE has a small client application that helps with opening urls
        # run 'kfmclient --commands' for help about the available commandline options
        $status = system( "kfmclient openURL ".$outgoing." text/html" );
        if ( $status ne 0 ) {
            print "Displaying URL in konqueror returned status: " . $status . "\n";
        }
    }
    else {

        # other applications are currently just started
        $status = system( $program, $outgoing );
        if ( $status ne 0 ) {
            print "Application " . $program
              . " returned status: " . $status . "\n";
        }
    }
}

__END__

=head1 NAME

websec - Web Secretary

=head1 SYNOPSIS

websec [options]


=head1 OPTIONS

=over 8

=item B<--help>

Print a brief help message and exits.

=item B<--man>

Prints the manual page and exits.

=item B<--base>

Base directory for configuration (~/.websec by default)

=item B<--urllist>

Use another file for the url list, by default it is "url.list".

=back

=head1 DESCRIPTION

B<websec> is a web page monitoring software.  It will send you a changed web
page with the contents highlighted.

The base directory is the place from which B<websec> will read the config files
and in which it will store its data.

When called without an argument, B<websec> will look for a base directory.
If the current directory has url.list it will use it, otherwise it will try to
use I<$HOME/.websec/>. You can also override this process with the I<--base>
option.

You can add a line like I<AddSubject = [websec]> to url.list, websec will add
I<[websec]> to every subject as a first word when mail is sent. You can then
easily detect this line by a mail filter.

The keywords I<Retry>, I<Retrywait>, and I<Timeout> in url.list lets you specify
the number of times to retry, time to wait between retries, and a timeout
setting.

B<Websec> waits for a random number of seconds between retries up to the value
specified by the I<Randomwait> keyword. This is to prevent websec from being
blocked by websites that perform log analysis to find time similarities between
requests.


=head1 SEE ALSO

/usr/share/doc/websec/README.gz, L<url.list(5)>, L<ignore.list(5)>, L<webdiff(1)>.


=head1 AUTHOR

Victor Chew is the original author of this software,
Baruch Even is continuing the maintenance and
Joop Stakenborg <pa3aba@debian.org> provided this man page, 

=cut

vim:set et ts=4: