Class: PasswordCrack::PasswordChecker
- Inherits:
-
Object
- Object
- PasswordCrack::PasswordChecker
- Defined in:
- lib/password_crack.rb
Instance Method Summary collapse
Instance Method Details
#check(password) ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/password_crack.rb', line 43 def check password result = check_by_dict password,'week_password_sample' return result if result return check_by_dict password,'birthday' end |
#check_by_dict(password, dict_name) ⇒ Object
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/password_crack.rb', line 56 def check_by_dict password,dict_name d = Dict.new dict_name File.open(d.create).each_line() do |pass| pass.chomp! return dict_name if pass == password end return nil end |