cobreak 0.0.4 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -1,6 +1,7 @@
1
1
  require 'optparse'
2
2
  require 'cobreak/cobreak'
3
3
  require 'cobreak/force_brute'
4
+ require 'cobreak/force_chars'
4
5
  require 'cobreak/version'
5
6
  require 'cobreak/list_all'
6
7
  module CoBreak
@@ -8,23 +9,40 @@ module CoBreak
8
9
  def self.optparse(options)
9
10
  begin
10
11
  OptionParser.new do|param|
11
- param.banner = "Usage: CoBreak.rb [--options] [text or file]"
12
+ param.banner = "Usage: CoBreak.rb [--mode] [--options] [text or file]"
12
13
  param.separator ''
13
14
  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}
15
+ param.on('--encoding=[TYPE]', String, 'encoding input text or file'){|en_co| options.enc = en_co}
16
+ param.on('--decoding=[TYPE]', String, 'decoding input text or file'){|de_co| options.dec = de_co}
16
17
  param.separator "Mode Cryptography"
17
18
  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
19
  param.separator "Mode BruteForce"
20
20
  param.on('--bruteforce=[FORMAT]', String, 'brute force mode to crack a hash'){|modeforce| options.bruteforce = modeforce}
21
21
  param.separator ""
22
22
  param.separator "Options:"
23
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}
24
+ param.on('-r', '--range MIN MAX', Array, "word chars length"){|rang| options.range = rang}
25
+ param.on('-c', '--chars CHARACTERS', String, 'character input to generate word lists'){|chars| options.chars = chars}
26
26
  param.on('-w', '--wordlist=WORDLIST', 'Wordlist mode, read words from FILE or stadin (default: diccionario.txt)'){|wordlist| options.wordlist = wordlist}
27
+ param.on('--show=[FORMAT]', String, 'show decrypted specific hash'){|de_en| options.decrypt = de_en}
27
28
  param.on('-i', '--input FILE or TEXT', String, 'take file or text to carry out the process'){|alg| options.algo = alg}
29
+ param.on('--usage', 'show examples of use of this tool')do
30
+ puts "usage: cobreak [--mode] [--options] [--input] text or file"
31
+ puts ""
32
+ puts "cipher:"
33
+ puts ""
34
+ puts "cobreak --encoding=[TYPE] --input text or file"
35
+ puts "cobreak --decoding=[TYPE] --input text or file"
36
+ puts ""
37
+ puts "note that the cesar cipher mode has to have a number in front to know the rotations"
38
+ puts "examples: --encoding=cesar 5 --input hola"
39
+ puts ""
40
+ puts "bruteforce:"
41
+ puts ""
42
+ puts "cobreak --bruteforce=[FORMAT] --wordlist=[WORDLIST] --input text or file"
43
+ puts "cobreak --bruteforce=[FORMAT] --chars [CHARACTERS] --range MIN MAX --input text or file"
44
+ puts ""
45
+ end
28
46
  param.on_tail('-v', '--version', 'show version'){puts "CoBreak version #{CoBreak.version}"; exit}
29
47
  param.on_tail('-h', '--help', 'command to view help parameters'){puts param; exit}
30
48
  param.separator ''
@@ -45,15 +63,24 @@ module CoBreak
45
63
  end
46
64
  end
47
65
  CoBreak::Box.var(options)
48
- CoBreak::Box::Cipher.coding()
49
- CoBreak::Box::Cryptgraphy.crypt()
66
+ if !(options.enc.nil?) or !(options.dec.nil?)
67
+ CoBreak::Box::Cipher.coding()
68
+ end
69
+ if !(options.encrypt.nil?) or !(options.decrypt.nil?)
70
+ CoBreak::Box::Cryptgraphy.crypt()
71
+ end
50
72
  CoBreak::List.new(options)
51
73
  unless (options.wordlist.nil?) or (options.wordlist.empty?)
52
74
  bruteforce = CoBreak::BruteForze.new(options)
53
75
  bruteforce.banner_wordlist()
54
76
  bruteforce.wordlist
55
77
  end
78
+ unless (options.chars.nil?) or (options.chars.empty?)
79
+ options.range << ARGV[0].to_i
80
+ brutechars = CoBreak::BruteChars.new(options)
81
+ brutechars.banner_chars()
82
+ brutechars.chars()
83
+ end
56
84
  end
57
85
  end
58
86
  end
59
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  module CoBreak
2
2
  def self.version()
3
- return '0.0.3'
3
+ return '1.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,57 +1,71 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cobreak
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - BreakerBox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-30 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: Digest
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - ">="
31
+ - - "~>"
18
32
  - !ruby/object:Gem::Version
19
- version: '0'
33
+ version: 3.0.0
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - ">="
38
+ - - "~>"
25
39
  - !ruby/object:Gem::Version
26
- version: '0'
40
+ version: 3.0.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: sequel
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - ">="
45
+ - - "~>"
32
46
  - !ruby/object:Gem::Version
33
- version: '0'
47
+ version: 5.44.0
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - ">="
52
+ - - "~>"
39
53
  - !ruby/object:Gem::Version
40
- version: '0'
54
+ version: 5.44.0
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: sqlite3
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - ">="
59
+ - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '0'
61
+ version: 1.4.2
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - ">="
66
+ - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '0'
68
+ version: 1.4.2
55
69
  description: The CoBreak script is an cipher and cryptography tool
56
70
  email: breakerhtb@gmail.com
57
71
  executables:
@@ -66,7 +80,8 @@ files:
66
80
  - cobreak.gemspec
67
81
  - diccionario.txt
68
82
  - lib/cobreak.rb
69
- - lib/cobreak/Cesar.rb
83
+ - lib/cobreak/binary.rb
84
+ - lib/cobreak/cesar.rb
70
85
  - lib/cobreak/cifrado.rb
71
86
  - lib/cobreak/cobreak.rb
72
87
  - lib/cobreak/decifrado.rb
@@ -75,18 +90,27 @@ files:
75
90
  - lib/cobreak/encrypt.rb
76
91
  - lib/cobreak/force.rb
77
92
  - lib/cobreak/force_brute.rb
93
+ - lib/cobreak/force_chars.rb
78
94
  - lib/cobreak/function_db.rb
79
95
  - lib/cobreak/function_hash.rb
96
+ - lib/cobreak/hash/hash.db
80
97
  - lib/cobreak/info_author.rb
81
98
  - lib/cobreak/list_all.rb
82
99
  - lib/cobreak/optionpr.rb
83
100
  - lib/cobreak/run.rb
101
+ - lib/cobreak/show/md4.db
102
+ - lib/cobreak/show/md5.db
103
+ - lib/cobreak/show/ripemd160.db
104
+ - lib/cobreak/show/sha1.db
105
+ - lib/cobreak/show/sha224.db
106
+ - lib/cobreak/show/sha256.db
107
+ - lib/cobreak/show/sha384.db
108
+ - lib/cobreak/show/sha512.db
84
109
  - lib/cobreak/version.rb
85
- homepage: https://rubygeminfo.org/breakerbox/cobreak
110
+ homepage: https://github.com/BreakerBox/CoBreak
86
111
  licenses:
87
112
  - MIT
88
- metadata:
89
- source_code_uri: https://github.com/BreakerBox/CoBreak
113
+ metadata: {}
90
114
  post_install_message: thanks for installing my gem
91
115
  rdoc_options: []
92
116
  require_paths: