Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save picatz/615a68cc1242365d6ad34b4f955dc8cc to your computer and use it in GitHub Desktop.
Save picatz/615a68cc1242365d6ad34b4f955dc8cc to your computer and use it in GitHub Desktop.
Violent Ruby: Unix Password Cracker Parse Etc File Method Usage
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