Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save picatz/bb1832c113daaef09aa3708d99ba1ccc to your computer and use it in GitHub Desktop.
Save picatz/bb1832c113daaef09aa3708d99ba1ccc to your computer and use it in GitHub Desktop.
Violent Ruby: Unix Password Cracker-- Basic Usage
require 'violent_ruby'
# configs are cool
config = { file: "/etc/passwd", dictionary: "dictionary.txt" }
# create a Unix Password Cracker object, with hte config
upc = ViolentRuby::UnixPasswordCracker.new(config)
# attempt to crack passwords, doing some stuff with the result
upc.crack do |result|
next unless result[:cracked]
puts "Cracked #{result[:username]}'s password: #{result[:plaintext_password]}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment