cobreak 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,227 @@
1
+ require 'sequel'
2
+ require 'ostruct'
3
+ require 'cobreak/function_hash'
4
+ class Forze_brute
5
+ def initialize(author = 'BreakerBox')
6
+ @author = author
7
+ end
8
+ def verify(dato, word = File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'hash', 'hash.db'))
9
+ hash_db = Sequel.sqlite
10
+ hash_db.create_table? :datahash do
11
+ String :ori
12
+ String :has
13
+ end
14
+ IO.foreach(word) {|lin|
15
+ lin = lin.chomp
16
+ hash_db[:datahash] << {ori:lin, has:dato}
17
+ }
18
+ ha = hash_db[:datahash].filter(ori:dato).map(:has)
19
+ arr = Array.new
20
+ arr << dato
21
+ if (ha == arr)
22
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash already existing in the database: #{dato}"
23
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m decrypt the hash using --decrypt, see the help parameter for more information"
24
+ exit
25
+ end
26
+ end
27
+ def md4(dato, wordlist)
28
+ verify(dato)
29
+ forzebrute = OpenStruct.new
30
+ forzebrute.time = Time.now
31
+ forzebrute.hash = dato
32
+ forzebrute.wordlist = wordlist
33
+ require 'openssl'
34
+ File.foreach(forzebrute.wordlist) {|line|
35
+ line.chomp!
36
+ forzebrute.md4 = OpenSSL::Digest::MD4.hexdigest(line)
37
+ if (forzebrute.md4 == forzebrute.hash)
38
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
39
+ puts line
40
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
41
+ $datBas::database(forzebrute.hash)
42
+ DB::database(forzebrute.md4, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'md4.db'))
43
+ exit
44
+ end
45
+ }
46
+ if true
47
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{dato}"
48
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
49
+ end
50
+ end
51
+ def md5(dato, wordlist)
52
+ # verify(dato)
53
+ forzebrute = OpenStruct.new
54
+ forzebrute.hash = dato
55
+ forzebrute.wordlist = wordlist
56
+ require 'digest/md5'
57
+ forzebrute.time = Time.now
58
+ File.foreach(forzebrute.wordlist) {|line|
59
+ line.chomp!
60
+ forzebrute.md5 = Digest::MD5.hexdigest(line)
61
+ if (forzebrute.md5 == forzebrute.hash)
62
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
63
+ puts line
64
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
65
+ $datBas::database(forzebrute.hash)
66
+ DB::database(forzebrute.md5, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'md5.db'))
67
+ exit
68
+ end
69
+ }
70
+ if true
71
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{dato}"
72
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
73
+ exit
74
+ end
75
+ end
76
+ def sha1(dato, wordlist)
77
+ verify(dato)
78
+ forzebrute = OpenStruct.new
79
+ forzebrute.time = Time.now
80
+ forzebrute.hash = dato
81
+ forzebrute.wordlist = wordlist
82
+ require 'digest/sha1'
83
+ File.foreach(forzebrute.wordlist) {|line|
84
+ line.chomp!
85
+ forzebrute.sha1 = Digest::SHA1.hexdigest(line)
86
+ if (forzebrute.sha1 == forzebrute.hash)
87
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
88
+ puts line
89
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
90
+ $datBas::database(forzebrute.hash)
91
+ DB::database(forzebrute.sha1, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'sha1.db'))
92
+ exit
93
+ end
94
+ }
95
+ if true
96
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{dato}"
97
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
98
+ end
99
+ end
100
+ def sha224(dato, wordlist)
101
+ verify(dato)
102
+ forzebrute = OpenStruct.new
103
+ forzebrute.time = Time.now
104
+ forzebrute.hash = dato
105
+ forzebrute.wordlist = wordlist
106
+ require 'digest/sha224'
107
+ File.foreach(forzebrute.wordlist) {|line|
108
+ line.chomp!
109
+ forzebrute.sha224 = Digest::SHA224.hexdigest(line)
110
+ if (forzebrute.sha224 == forzebrute.hash)
111
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
112
+ puts line
113
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
114
+ $datBas::database(forzebrute.hash)
115
+ DB::database(forzebrute.sha224, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'sha224.db'))
116
+ exit
117
+ end
118
+ }
119
+ if true
120
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{dato}"
121
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
122
+ exit
123
+ end
124
+ end
125
+ def sha256(dato, wordlist)
126
+ verify(dato)
127
+ forzebrute = OpenStruct.new
128
+ forzebrute.time = Time.now
129
+ forzebrute.hash = dato
130
+ forzebrute.wordlist = wordlist
131
+ require 'digest/sha256'
132
+ File.foreach(forzebrute.wordlist) {|line|
133
+ line.chomp!
134
+ forzebrute.sha256 = Digest::SHA256.hexdigest(line)
135
+ if (forzebrute.sha256 == forzebrute.hash)
136
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
137
+ puts line
138
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
139
+ $datBas::database(forzebrute.hash)
140
+ DB::database(forzebrute.sha256, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'sha256.db'))
141
+ exit
142
+ end
143
+ }
144
+ if true
145
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{dato}"
146
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
147
+ exit
148
+ end
149
+ end
150
+ def sha384(dato, wordlist)
151
+ verify(dato)
152
+ forzebrute = OpenStruct.new
153
+ forzebrute.time = Time.now
154
+ forzebrute.hash = dato
155
+ forzebrute.wordlist = wordlist
156
+ require 'digest/sha384'
157
+ File.foreach(forzebrute.wordlist) {|line|
158
+ line.chomp!
159
+ forzebrute.sha384 = Digest::SHA384.hexdigest(line)
160
+ if (forzebrute.sha384 == forzebrute.hash)
161
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
162
+ puts line
163
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
164
+ $datBas::database(forzebrute.hash)
165
+ DB::database(forzebrute.sha384, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'sha384.db'))
166
+ exit
167
+ end
168
+ }
169
+ if true
170
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{forzebrute.hash}"
171
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
172
+ exit
173
+ end
174
+ end
175
+ def sha512(dato, wordlist)
176
+ verify(dato)
177
+ forzebrute = OpenStruct.new
178
+ forzebrute.time = Time.now
179
+ forzebrute.hash = dato
180
+ forzebrute.wordlist = wordlist
181
+ require 'digest/sha512'
182
+ File.foreach(forzebrute.wordlist) {|line|
183
+ line.chomp!
184
+ forzebrute.sha512 = Digest::SHA512.hexdigest(line)
185
+ if (forzebrute.sha512 == forzebrute.hash)
186
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
187
+ puts line
188
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
189
+ $datBas::database(forzebrute.hash)
190
+ DB::database(forzebrute.sha512, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'sha512.db'))
191
+ exit
192
+ end
193
+ }
194
+ if true
195
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{forzebrute.hash}"
196
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
197
+ exit
198
+ end
199
+ end
200
+ def ripemd160(dato, wordlist)
201
+ verify(dato)
202
+ verify(dato)
203
+ forzebrute = OpenStruct.new
204
+ forzebrute.time = Time.now
205
+ forzebrute.hash = dato
206
+ forzebrute.wordlist = wordlist
207
+ require 'digest/rmd160'
208
+ File.foreach(forzebrute.wordlist) {|line|
209
+ line.chomp!
210
+ forzebrute.ripemd160 = Digest::RMD160.hexdigest(line)
211
+ if (forzebrute.ripemd160 == forzebrute.hash)
212
+ print "\e[1;32m[\e[0m+\e[1;32m]\e[0m Decrypted Text: "
213
+ puts line
214
+ puts "\e[1;32m[\e[0m+\e[1;32m]\e[0m Hash Cracking #{Time.now - forzebrute.time} seconds"
215
+ $datBas::database(forzebrute.hash)
216
+ DB::database(forzebrute.ripemd160, File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'show', 'ripemd160.db'))
217
+ exit
218
+ end
219
+ }
220
+ if true
221
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Not Decrypted Text: #{forzebrute.hash}"
222
+ puts "\e[1;31m[\e[0m+\e[1;31m]\e[0m Time: #{Time.now - forzebrute.time} seconds"
223
+ exit
224
+ end
225
+ end
226
+ end
227
+ ForzeBrute = Forze_brute.new
@@ -0,0 +1,81 @@
1
+ #!/bin/env ruby
2
+ require 'cobreak/version'
3
+ module CoBreak
4
+ class BruteForze
5
+ def initialize(options)
6
+ @options = options
7
+ @hash = %w[MD4 MD5 SHA1 SHA224 SHA256 SHA384 SHA512 RIPEMD160]
8
+ end
9
+ begin
10
+ require 'cobreak/force'
11
+ rescue LoadError => e
12
+ puts e.message
13
+ abort "reinstall gem new"
14
+ end
15
+ def banner_wordlist()
16
+ puts "\e[32m╭─[\e[0m CoBreak: #{CoBreak.version}"
17
+ if (File.exists?(@options.wordlist.to_s))
18
+ puts "\e[32m├─[\e[0m Wordlist: #{File.expand_path(@options.wordlist)}"
19
+ else
20
+ puts "\e[31m├─[\e[0m WordList Not Found"
21
+ end
22
+ if (@hash.include?(@options.bruteforce.to_s.upcase))
23
+ puts "\e[32m├─[\e[0m Type Hash: #{@options.bruteforce.upcase}"
24
+ else
25
+ puts "\e[31m├─[\e[0m Type Hash Not Found"
26
+ end
27
+ unless (@options.algo.nil?) or (@options.algo.empty?)
28
+ puts "\e[32m╰─[\e[0m Hash: #{@options.algo}\n\n"
29
+ else
30
+ puts "\e[31m╰─[\e[0m Hash Not Found"
31
+ end
32
+ end
33
+ def wordlist()
34
+ if (@options.wordlist.nil?) or (@options.wordlist.empty?) or ('-'.include?(@options.wordlist.to_s))
35
+ abort "\n"
36
+ end
37
+ if (@hash.include?(@options.bruteforce.to_s.upcase))
38
+ if (File.exists?(@options.algo.to_s))
39
+ IO.foreach(@options.algo.to_s){|line|
40
+ line.chomp!
41
+ if (@options.bruteforce.to_s.downcase.eql?('md4'))
42
+ ForzeBrute::md4(line, @options.wordlist)
43
+ elsif (@options.bruteforce.to_s.downcase.eql?('md5'))
44
+ ForzeBrute::md5(line, @options.wordlist)
45
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha1'))
46
+ ForzeBrute::sha1(line, @options.wordlist)
47
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha224'))
48
+ ForzeBrute::sha224(line, @options.wordlist)
49
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha256'))
50
+ ForzeBrute::sha256(line, @options.wordlist)
51
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha384'))
52
+ ForzeBrute::sha384(line, @options.wordlist)
53
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha512'))
54
+ ForzeBrute::sha512(line, @options.wordlist)
55
+ elsif (@options.bruteforce.to_s.downcase.eql?('ripemd160'))
56
+ ForzeBrute::ripemd160(line, @options.wordlist)
57
+ end
58
+ }
59
+ else
60
+ if (@options.bruteforce.to_s.downcase.eql?('md4'))
61
+ ForzeBrute::md4(@options.algo.to_s, @options.wordlist)
62
+ elsif (@options.bruteforce.to_s.downcase.eql?('md5'))
63
+ ForzeBrute::md5(@options.algo.to_s, @options.wordlist)
64
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha1'))
65
+ ForzeBrute::sha1(@options.algo.to_s, @options.wordlist)
66
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha224'))
67
+ ForzeBrute::sha224(@options.algo.to_s, @options.wordlist)
68
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha256'))
69
+ ForzeBrute::sha256(@options.algo.to_s, @options.wordlist)
70
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha384'))
71
+ ForzeBrute::sha384(@options.algo.to_s, @options.wordlist)
72
+ elsif (@options.bruteforce.to_s.downcase.eql?('sha512'))
73
+ ForzeBrute::sha512(@options.algo.to_s, @options.wordlist)
74
+ elsif (@options.bruteforce.to_s.downcase.eql?('ripemd160'))
75
+ ForzeBrute::ripemd160(@options.algo.to_s, @options.wordlist)
76
+ end
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
@@ -0,0 +1,27 @@
1
+ require 'fileutils'
2
+ require 'sequel'
3
+ class DataBase
4
+ $db = Sequel.sqlite
5
+ $db.create_table? :database do
6
+ String :text_db
7
+ end
8
+ def initialize(alg = nil)
9
+ @alg = alg
10
+ end
11
+ def database(alg, var1)
12
+ if File.exists?(var1) == false
13
+ FileUtils.touch(var1)
14
+ end
15
+ IO.foreach(var1) {|line|
16
+ line.chomp!
17
+ $db[:database] << {text_db:line}
18
+ }
19
+ if ($db[:database].filter(text_db:alg).map(:text_db)).include?(alg) == true
20
+ exit
21
+ end
22
+ File.open(var1, mode: 'a'){|lin|
23
+ lin.puts alg
24
+ }
25
+ end
26
+ end
27
+ DB = DataBase.new
@@ -0,0 +1,29 @@
1
+ require 'fileutils'
2
+ require 'sequel'
3
+ require 'cobreak/version'
4
+ class BaseDato
5
+ $db = Sequel.sqlite
6
+ $db.create_table? :database do
7
+ String :text_db
8
+ end
9
+ def initialize(alg = nil)
10
+ @alg = alg
11
+ end
12
+ def database(alg)
13
+ var1 = File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'hash', 'hash.db')
14
+ if File.exists?(var1) == false
15
+ FileUtils.touch(var1)
16
+ end
17
+ IO.foreach(var1) {|line|
18
+ line.chomp!
19
+ $db[:database] << {text_db:line}
20
+ }
21
+ if ($db[:database].filter(text_db:alg).map(:text_db)).include?(alg) == true
22
+ exit
23
+ end
24
+ File.open(var1, mode: 'a'){|lin|
25
+ lin.puts alg
26
+ }
27
+ end
28
+ end
29
+ $datBas = BaseDato.new
@@ -0,0 +1,29 @@
1
+ ac5585d98646d255299c359140537783
2
+ 4d186321c1a7f0f354b297e8914ab240
3
+ 849ceedae14b70e6292c58f27454cff4
4
+ 0fb0a49e3068aae01d664978c56a2291
5
+ 4cecb21b44628b17c436739bf6301af2
6
+ 187ef4436122d1cc2f40dc2b92f0eba0
7
+ b86fc6b051f63d73de262d4c34e3a0a9
8
+ 670da91be64127c92faac35c8300e814
9
+ f9ca81659235ad6de39c77cb7154f30d
10
+ 0ef546118008f6fb7ebab60c7e3cee2f
11
+ fb8d211b98db3feb5206ed7501749cd8
12
+ 2466ed15c785916f782b6ab6daa558df
13
+ da387ec05c4902110dabb22395a26b6b
14
+ 534b9a3588bdd87bf7c3b9d650e43e46
15
+ 60885f7923ace3a3328c23e98c88e60e
16
+ 518ed29525738cebdac49c49e60ea9d3
17
+ 31d6cfe0d16ae931b73c59d7e0c089c0
18
+ d41d8cd98f00b204e9800998ecf8427e
19
+ 2510c39011c5be704182423e3a695e91
20
+ 99800b85d3383e3a2fb45eb7d0066a4879a9dad0
21
+ f39ef9f3e4426b4b9b705b52d4b8ae426c33f9b0
22
+ 1a1f58c9adc75e11a9c4c108e39bb79bfb4435ac
23
+ 41d1de28e96dc1cde568d3b068fa17bb
24
+ f33da01f361b228b4406e1f3cc467777
25
+ a439344f4b08d69e633a4ae02ced47a3b89cf37dd8138d5568696657
26
+ d77e22123e64d3d87f1f95d9cff7a0b6af6c32b9a81552cb90e991eb55cf63d4
27
+ aa985c9abeaa7eaa4cba092bb9cf324d5b1a166ba71b994104d3ea7bca7b66f2ebf2c556e78fda4ef3c7cf310a649acd
28
+ 789ffe2f72383f30704918bf701f9f2fe4ae836857c0c415319850d099b0aa219fb7f0c5c029d1e959ed0f91594354b5003946dfff4bf95673072fa15af9ccb3
29
+ e5b4c7c6d3e871790c46124c2b51cf177b5bb9fc
@@ -0,0 +1,22 @@
1
+ require 'launchy'
2
+ module CoBreak
3
+ class Author
4
+ def self.author()
5
+ return "Breaker Box"
6
+ end
7
+ def self.email()
8
+ return "breakerhtb@gmail.com"
9
+ end
10
+ def self.date()
11
+ return "2020-5-25"
12
+ end
13
+ def self.telegram()
14
+ return "@BreakerBox"
15
+ end
16
+ def self.group()
17
+ group = "https://t.me/Black0utx"
18
+ Launchy.open(group)
19
+ return group
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,19 @@
1
+ module CoBreak
2
+ class List
3
+ #all list formats and types
4
+ def initialize(options)
5
+ type = Array.new
6
+ type << "Base64" << "Base32" << "Base16" << "Ascii85" << "Binary" << "Cesar"
7
+ if (options.list.eql?("type"))
8
+ puts "\nMode Cipher:"
9
+ puts type
10
+ end
11
+ format = Array.new
12
+ format << "MD4" << "MD5" << "SHA1" << "SHA224" << "SHA256" << "SHA384" << "SHA512" << "RIPEMD160"
13
+ if (options.list.eql?("format"))
14
+ puts "\nMode Cryptography:"
15
+ puts format
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,59 @@
1
+ require 'optparse'
2
+ require 'cobreak/cobreak'
3
+ require 'cobreak/force_brute'
4
+ require 'cobreak/version'
5
+ require 'cobreak/list_all'
6
+ module CoBreak
7
+ class ParseOPT
8
+ def self.optparse(options)
9
+ begin
10
+ OptionParser.new do|param|
11
+ param.banner = "Usage: CoBreak.rb [--options] [text or file]"
12
+ param.separator ''
13
+ param.separator "Mode Cipher:"
14
+ param.on('--encoding=[TYPE]', String, 'encoding parameter'){|en_co| options.enc = en_co}
15
+ param.on('--decoding=[TYPE]', String, 'decoding parameter'){|de_co| options.dec = de_co}
16
+ param.separator "Mode Cryptography"
17
+ param.on('--encrypt=[FORMAT]', String, 'encrypt parameter'){|en_en| options.encrypt = en_en}
18
+ param.on('--decrypt=[FORMAT]', String, 'decrypt parameter'){|de_en| options.decrypt = de_en}
19
+ param.separator "Mode BruteForce"
20
+ param.on('--bruteforce=[FORMAT]', String, 'brute force mode to crack a hash'){|modeforce| options.bruteforce = modeforce}
21
+ param.separator ""
22
+ param.separator "Options:"
23
+ param.on('-l', '--list=TYPE or FORMAT', String, 'list cipher types of hash formats'){|lin| options.list = lin}
24
+ param.on('-r', '--range MIN MAX', Integer, "word chars length"){|min| options.min = min}
25
+ param.on('-c', '--chars CHARACTERS', 'character input to generate word lists'){|chars| options.chars = chars}
26
+ param.on('-w', '--wordlist=WORDLIST', 'Wordlist mode, read words from FILE or stadin (default: diccionario.txt)'){|wordlist| options.wordlist = wordlist}
27
+ param.on('-i', '--input FILE or TEXT', String, 'take file or text to carry out the process'){|alg| options.algo = alg}
28
+ param.on_tail('-v', '--version', 'show version'){puts "CoBreak version #{CoBreak.version}"; exit}
29
+ param.on_tail('-h', '--help', 'command to view help parameters'){puts param; exit}
30
+ param.separator ''
31
+ end.parse!
32
+ rescue OptionParser::MissingArgument => missing
33
+ if missing.to_s.include?("--wordlist")
34
+ options.wordlist = File.join(Gem.path[1], 'gems', "cobreak-#{CoBreak.version}", 'diccionario.txt')
35
+ elsif missing.to_s.include?("--chars")
36
+ options.chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
37
+ else
38
+ puts missing.message
39
+ end
40
+ ensure
41
+ if (options.wordlist == "diccionario.txt")
42
+ unless (File.exists?(options.wordlist))
43
+ options.wordlist = File.join(Gem.path[1], 'gems', "cobreak-#{CoBreak.version}", 'diccionario.txt')
44
+ end
45
+ end
46
+ end
47
+ CoBreak::Box.var(options)
48
+ CoBreak::Box::Cipher.coding()
49
+ CoBreak::Box::Cryptgraphy.crypt()
50
+ CoBreak::List.new(options)
51
+ unless (options.wordlist.nil?) or (options.wordlist.empty?)
52
+ bruteforce = CoBreak::BruteForze.new(options)
53
+ bruteforce.banner_wordlist()
54
+ bruteforce.wordlist
55
+ end
56
+ end
57
+ end
58
+ end
59
+