Created
April 16, 2017 02:32
-
-
Save picatz/615a68cc1242365d6ad34b4f955dc8cc to your computer and use it in GitHub Desktop.
Violent Ruby: Unix Password Cracker Parse Etc File Method 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
upc = ViolentRuby::UnixPasswordCracker.new | |
upc.parse_etc_file(file: 'passwords.txt') | |
# {"victim" => "HX9LLTdc/jiDE", "root" => "DFNFxgW7C05fo"} | |
upc.parse_etc_file(file: 'passwords.txt') do |user, pass| | |
puts user + ' ' + pass | |
end | |
# victim HX9LLTdc/jiDE | |
# root DFNFxgW7C05fo | |
ViolentRuby::UnixPasswordCracker.new.parse_etc_file(file: 'passwords.txt') do |user, pass| | |
puts user + ' ' + pass | |
end | |
# victim HX9LLTdc/jiDE | |
# root DFNFxgW7C05fo | |
ViolentRuby::UnixPasswordCracker.new.parse_etc_file(file: 'passwords.txt') | |
# {"victim"=>"HX9LLTdc/jiDE", "root"=>"DFNFxgW7C05fo"} | |
ViolentRuby::UnixPasswordCracker.new.parse_etc_file(file: 'passwords.txt', users: true) | |
# ["victim", "root"] | |
ViolentRuby::UnixPasswordCracker.new.parse_etc_file(file: 'passwords.txt', passwords: true) | |
# ["HX9LLTdc/jiDE", "DFNFxgW7C05fo"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment