class PwnedPasswordsWish
Public Instance Methods
aliases()
click to toggle source
# File lib/rubeepass/wish/pwned_passwords.rb, line 5 def aliases return ["check", "pwned"] end
description()
click to toggle source
# File lib/rubeepass/wish/pwned_passwords.rb, line 9 def description return [ "Check passwords against", "https://haveibeenpwned.com/passwords" ].join(" ") end
execute(args, djinni_env = Hash.new)
click to toggle source
# File lib/rubeepass/wish/pwned_passwords.rb, line 16 def execute(args, djinni_env = Hash.new) if (!args.empty?) usage return end pwned = djinni_env["keepass"].pwnedpasswords pwned.each do |entry| puts "#{entry.path.cyan} was pwned: #{entry.password.red}" end puts "No passwords are known to be pwned" if (pwned.empty?) end
usage()
click to toggle source
# File lib/rubeepass/wish/pwned_passwords.rb, line 29 def usage puts "#{aliases.join(", ")}" puts " #{description}." end