Visa ett inlägg
Oläst 2006-08-08, 23:26 #3
Filips avatar
Filip Filip är inte uppkopplad
Mycket flitig postare
 
Reg.datum: Jan 2003
Inlägg: 935
Filip Filip är inte uppkopplad
Mycket flitig postare
Filips avatar
 
Reg.datum: Jan 2003
Inlägg: 935
Här är ett perl script du kan använda för att skapa lösenord.
Lägg in informationen i en fil vid namn crypt.cgi och lägg upp den i din cgi-bin mapp på servern. Chmod:a den till 755 och kör den i webbläsaren.


#!/usr/bin/perl
# crypt.cgi by David Efflandt, last updated 9/04/99
# Crypts a password for use with web authentication

use CGI qw/:standard :netscape/;
srand( time() ^ ($$ + ($$ << 15)));

print header,start_html('Crypt a Password'),"\n","\n";
if(param()) {
$word = param('word');
@range = ('0'..'9','a'..'z','A'..'Z','.','/');
$salt = $range[rand(int($#range)+1)] . $range[rand(int($#range)+1)];
$pass = crypt($word, $salt);

print h1("Result of crypt $word"),hr,'A crypted version of ',
em($word),' is: ',em($pass),p,
'Example of a line in a password file for web authentication '.
'(colon separated):',p,pre("username:$pass"),hr;
}

print b("Note: "),a({href=>'crypt.txt'},'This Script'),
' works best when run on the system you need passords for because some
systems use a more secure ',em('crypt'),' that ends up with more than the
usual 13 character crypted password.';

print start_form,center(table({border=>1,cellpadding=>10 },
Tr([th([("Crypt a Plain Text Password").br.textfield('word').br.submit])
]))),end_form,p,end_html;
Filip är inte uppkopplad   Svara med citatSvara med citat