fprintf(f, "# Generated by Mandshurica " MANDSHURICA_VERSION "\n");
fprintf(f, "ServerRoot %s\n", PREFIX);
fprintf(f, "\n");
+ fprintf(f, "Set BasicDB %s/passwd.db\n", PREFIX);
fprintf(f, "Set HTTPPort 1024\n");
fprintf(f, "Set HTTPRoot %s\n", WEBROOT_PREFIX);
fprintf(f, "\n");
}
if(count == 1) {
- log = mandshurica_strcat("HTTP Server available uthentication method is ", auth[0] == 0 ? "(none)" : auth);
+ log = mandshurica_strcat("HTTP Server available authentication method is ", auth[0] == 0 ? "(none)" : auth);
} else {
log = mandshurica_strcat("HTTP Server available authentication methods are ", auth[0] == 0 ? "(none)" : auth);
}
#!/usr/bin/env perl
# $Id$
-use Digest::SHA qw(sha256 sha256_hex);
+use Digest::SHA qw(sha512 sha512_hex);
require Term::ReadKey;
if(@ARGV < 1) {
- print "Pass me username\n";
+ print STDERR "Pass me username\n";
exit 1
}
-print "Password: ";
+print STDERR "Password: ";
Term::ReadKey::ReadMode("noecho");
my $password = Term::ReadKey::ReadLine(0);
-print "\n";
-print "Verify Password: ";
+print STDERR "\n";
+print STDERR "Verify Password: ";
my $verify = Term::ReadKey::ReadLine(0);
-print "\n";
+print STDERR "\n";
if ($password eq $verify) {
- my $digest = sha256_hex($password);
+ my $digest = sha512_hex($password);
print "$ARGV[0]:$digest\n";
} else {
- print "Unmatched\n";
+ print STDERR "Unmatched\n";
exit 1
}