Class: CoBreak::BruteChars
- Inherits:
-
Object
- Object
- CoBreak::BruteChars
- Defined in:
- lib/cobreak/force_chars.rb
Instance Method Summary collapse
- #banner_chars ⇒ Object
- #chars ⇒ Object
-
#initialize(options) ⇒ BruteChars
constructor
A new instance of BruteChars.
Constructor Details
#initialize(options) ⇒ BruteChars
Returns a new instance of BruteChars.
6 7 8 9 |
# File 'lib/cobreak/force_chars.rb', line 6 def initialize() @options = @hash = %w[MD4 MD5 SHA1 SHA224 SHA256 SHA384 SHA512 RIPEMD160] end |
Instance Method Details
#banner_chars ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/cobreak/force_chars.rb', line 10 def () puts "\e[0;31m" puts "cobreak".art("Bloody") puts "\e[0m" puts "\e[1;32m╭─[\e[1;37m CoBreak: #{CoBreak.version}" unless (@options.range.nil?) puts "\e[32m├─[\e[1;37m Range: #{@options.range[0]} #{@options.range[1]}" else puts "\e[31m├─[\e[1;37m Range Not Found" end unless (@options.chars.nil?) or (@options.chars.empty?) puts "\e[32m├─[\e[1;37m Characters: #{@options.chars}" else puts "\e[31m├─[\e[1;37m Characters Not Found" end if (@hash.include?(@options.bruteforce.to_s.upcase)) puts "\e[32m├─[\e[1;37m Type Hash: #{@options.bruteforce.upcase}" else puts "\e[31m├─[\e[1;37m Type Hash Not Found" end unless (@options.algo.nil?) or (@options.algo.empty?) puts "\e[32m╰─[\e[1;37m Hash: #{@options.algo}\n\n" else puts "\e[31m╰─[\e[1;37m Hash Not Found" end end |
#chars ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/cobreak/force_chars.rb', line 36 def chars() # if (@options.range.empty?) or (@options.chars.nil?) or (@param.algo.nil?) # abort "\n" # end if (@hash.include?(@options.bruteforce.upcase)) if (File.exists?(@options.algo.to_s)) IO.foreach(@options.algo){|line| line.chomp! ForzeBrute::chars(line, @options.range, @options.chars, @options.bruteforce, @options.out, @options.verbose) } else if (@hash.include?(@options.bruteforce.upcase)) ForzeBrute::chars(@options.algo, @options.range, @options.chars, @options.bruteforce, @options.out, @options.verbose) end end end end |