• ¡Welcome to Square Theme!
  • This news are in header template.
  • Please ignore this message.
مهمان عزیز خوش‌آمدید. ورود عضــویت


امتیاز موضوع:
  • 17 رای - 2.47 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
Title: تست قدرت پسورد
حالت موضوعی
#1
درود
با استفاده از اسکریپت زیر که بنده نوشتم میتوانید قدرت یک پسورد را در پایتان تست نمایید.

البته کمی از لحاظ الگوریتمی دچار مشکل است اما هدف شبیه سازی بوده نه طراحی برنامه جامعی برای تست قدرت پسورد


کد:
'program by Anarchy '
score=0
password=input('Enter A Password:')

digit=any(a.isdigit() for a in password)
lower=any(a.islower() for a in password)
upper=any(a.isupper() for a in password)
special=any(a in password for a in '!@#$%^&*()')
if digit==True :
    score+=1
if lower==True  :
    score+=2
if upper==True :
    score+=2
if len(password) <3:
    print('At Least Enter 3 letters')
    pause=input('Press any key')
    exit
if len(password)>=8 :
    score+=4
if len(password)<=5 :
    
    score+=1
    if len(password)<=7 and score>=5 :
        
       score+=2
if  special==True:
    
    score+=4

if score >=13:
    print(password +' Is Very Strong')
if score >=9 and score <13:
    print(password + 'Is Strong')
if score==8 or score==7:
    print(password +' Is Good')
if score==3 or  score==4 :
    print(password +' Is Very Weak')

if score==6 or score==5:
    print(password +' Is Weak')
 
پاسخ
  


موضوعات مشابه ...
موضوع نویسنده پاسخ بازدید آخرین ارسال
  ساخت پسورد تصادفی در پایتان Anarchy 0 1,855 09-28-2014، 12:25 AM
آخرین ارسال: Anarchy

پرش به انجمن:


Browsing: 1 مهمان