iAnonGuy

Zip Password Cracker

Jul 11th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.72 KB | None | 0 0
  1. require 'archive/zip'
  2. require 'fileutils'
  3.  
  4. Gem.win_platform? ? (system 'cls') : (system 'clear')
  5.  
  6. separator = '---------------------------------------------------'
  7. c         = 0
  8.  
  9. puts "#{separator}\n\t\s\s--> Zip Cracker by AnonGuy <--\n\t\s\s\s\s\san0nguy[at]protonmail.ch\n#{separator}"
  10. print "Wordlist\s\s\s\s--> "
  11. wordlist  = gets.chomp
  12. print "Zip Archive --> "
  13. archive   = gets.chomp
  14. print "#{separator}\n"
  15.  
  16. File.readlines(wordlist).each do |pw|
  17.     pass = pw.chomp
  18.     c   += 1
  19.     begin
  20.         Archive::Zip.extract(archive, 'tmp', :password => pass)
  21.         FileUtils.rm_rf('tmp')
  22.         abort("Password Found\s\s\s\s\s\s--> #{pass}\nTotal Attempts Made --> #{c}\n\nEnding Script Execution . . .\n#{separator}")
  23.     rescue
  24.     end
  25. end
Add Comment
Please, Sign In to add comment