Created
April 16, 2017 01:38
-
-
Save picatz/bb1832c113daaef09aa3708d99ba1ccc to your computer and use it in GitHub Desktop.
Violent Ruby: Unix Password Cracker-- Basic Usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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