Invalid statement
Posted: Fri Apr 05, 2019 2:06 am
I'm trying to create a password strength tester.
Bellow is my current code:
I can make it work if I make an extremely long version just as the other example show bellow:
I really don't want to do the second option what is my best COA (Course of Action)?
Bellow is my current code:
Code: Select all
if mouseUp then
repeat until t2s = false
if mouseleave then
put the num of chars of tT1 into t2t
if tT1 <= 10 then
answer "Please make your Password more than 10 characters long"
set the text of tT1 to "Password"
put true into t2s
else
put "0123456789" into tList156
if any char from tList156 is not among tT1 then
answer "Please add a number to your Password"
put true into t2s
else
put "`~!@#$%^&*()_-+=}{][|\<,>.?/" into tList175
if any char from tList175 is not among the text of tT1 then
answer "Please add a special character to your Password", "eg.`~!@#$%^&*()_-+=}{][|\<,>.?/"
put true into t2s
else
put false into t2s
end if
end if
end if
end repeat
end if
end if
Code: Select all
if "a" or "A" is among tT1 then
put 1 into tC1
else
put 0 into tC1
end if
if "b" or "B" is among tT1 then
put 1 into tC2
else
put 0 into tC2
end if
if tC1 + tC2 >= 1 then
--password is strong
put false into t2s
else
--weak password
put true into t2s
end if