fb:porticula NoPaste
Passwortsicherheit bewerten (noch sicherer)
Uploader: | AndT |
Datum/Zeit: | 18.10.2007 21:11:41 |
Function PasswortDiagnose(Passwort as string ) as double
dim as integer chars(256)
dim as string char
dim as double wertung
for i as integer =1 to len(Passwort)
char=mid(passwort,i,1)
chars(asc(char))+=1
if chars(asc(char))> 5 then wertung-=1 else wertung+=.5
next
wertung+=len(passwort)/5
if wertung < 0 then wertung = 0
if wertung > 10 then wertung = 10
function = wertung
end function
dim as string eng_passwort
do
Print "Passwort eingeben: ";
input eng_passwort
Print int(PasswortDiagnose(eng_passwort))
loop