class CoBreak::BruteForze
Public Class Methods
new(options)
click to toggle source
# File lib/cobreak/force_brute.rb, line 7 def initialize(options) @options = options @hash = %w[MD4 MD5 SHA1 SHA224 SHA256 SHA384 SHA512 RIPEMD160] end
Public Instance Methods
wordlist()
click to toggle source
# File lib/cobreak/force_brute.rb, line 38 def wordlist() if (@options.wordlist.nil?) or (@options.wordlist.empty?) or ('-'.include?(@options.wordlist.to_s)) abort "\n" end if (@hash.include?(@options.bruteforce.to_s.upcase)) if (File.exists?(@options.algo.to_s)) IO.foreach(@options.algo.to_s){|line| line.chomp! if (@hash.include?(@options.bruteforce.to_s.upcase)) ForzeBrute::word(line, @options.wordlist, @options.bruteforce.to_s) end } else if (@hash.include?(@options.bruteforce.upcase.to_s)) ForzeBrute::word(@options.algo.to_s, @options.wordlist, @options.bruteforce.to_s, @options.out, @options.verbose) end end end end