Einzelnen Beitrag anzeigen
Alt 29.01.2002, 18:42   #4
_m3
Inventar
 
Registriert seit: 24.09.2001
Beiträge: 7.335


Standard

Nicht verzagen, m3 Fragen:
Code:
#!/usr/bin/perl
if (scalar(@ARGV) < 2) {
print <<EOF;
usage: make-password <htpasswd file> <user> <password>
EOF
exit;
}

$salt="XX";
$file=$ARGV[0];
$key=$ARGV[1];
$value=$ARGV[2];

if ($file && $key && $value) {
$hash = crypt($value, "$salt");
open(DB, ">>$file") || die "Error: $!\n";
print DB "$key:$hash\n";
close(DB);
print "User $key added with password $value, 
encrypted to $hash\n";
exit;
}
____________________________________
Weiterhin zu finden auf http://martin.leyrer.priv.at , http://twitter.com/leyrer , http://www.debattierclub.net/ , http://www.tratschen.at/ und via Instant Messaging auf Jabber: m3 <ät> cargal.org .
_m3 ist offline   Mit Zitat antworten