Created
April 16, 2017 01:49
-
-
Save picatz/cdc5298b98fdb69fd55dc7b0a6030859 to your computer and use it in GitHub Desktop.
Violent Ruby: Unix Password Cracker Base
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
# Unix Password Cracker | |
# @author Kent 'picat' Gruber | |
class UnixPasswordCracker | |
# @!attribute file | |
# @return [String] Path to the /etc/passwd file. | |
attr_accessor :file | |
# @!attribute dictionary | |
# @return dictionary [String] Path to dictionary file. | |
attr_accessor :dictionary | |
# Same same, but different, but still same. | |
alias etc file | |
# Create a new Unix Password Cracker. | |
# | |
# @param args [Hash] The options to create a new Unix Password Cracker. | |
# @option args [String] :file The path to an /etc/passwd file. | |
# @option args [String] :dictionary The path to a dictionry of passwords. | |
# | |
# @return [UnixPasswordCracker] | |
def initialize(args = {}) | |
@file = args[:file] if args[:file] | |
@dictionary = args[:dictionary] if args[:dictionary] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment