summaryrefslogtreecommitdiffstats
path: root/rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl
diff options
context:
space:
mode:
authorhongbotian <hongbo.tianhongbo@huawei.com>2015-11-30 03:10:21 -0500
committerhongbotian <hongbo.tianhongbo@huawei.com>2015-11-30 03:10:21 -0500
commitc0b7206652b2852bc574694e7ba07ba1c2acdc00 (patch)
tree5cb95cb0e19e03610525903df46279df2c3b7eb1 /rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl
parentb6d3d6e668b793220f2d3af1bc3e828553dc3fe6 (diff)
delete app
Change-Id: Id4c572809969ebe89e946e88063eaed262cff3f2 Signed-off-by: hongbotian <hongbo.tianhongbo@huawei.com>
Diffstat (limited to 'rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl')
-rw-r--r--rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl36
1 files changed, 0 insertions, 36 deletions
diff --git a/rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl b/rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl
deleted file mode 100644
index 35228022..00000000
--- a/rubbos/app/httpd-2.0.64/support/SHA1/convert-sha1.pl
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-
-# This is public domain code. Do whatever you want with it.
-# It was originally included in Clinton Wong's Apache 1.3.6 SHA1/ldif
-# patch distribution as sample code for converting accounts from
-# ldif format (as used by Netscape web servers) to Apache password format.
-
-my $uid='';
-my $passwd='';
-
-while (my $line = <>) {
- chomp $line;
- if ( $line =~ /uid:\s*(.+)/) { $uid = $1 }
- if ( $line =~ /userpassword:\s*(\{\w+\}.+)/) {
- $passwd = $1;
- $passwd =~ s/^\{crypt\}//i; # Apache stores crypt without a magic string
- }
-
- if (length($line)==0) {
-
- if (length $uid and length $passwd) {
- print $uid, ':', $passwd, "\n";
- } # output if we have something to print
-
- $uid = '';
- $passwd = '';
-
- } # if newline
-} # while something to read
-
-# handle last entry if there isn't a newline before EOF
- if (length $uid and length $passwd) {
- print $uid, ':', $passwd, "\n";
-}
-