c7decrypt 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/{c7decrypt.rb → c7decrypt} +22 -3
- data/lib/c7decrypt/version.rb +1 -1
- metadata +3 -3
@@ -1,12 +1,17 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
2
3
|
require 'optparse'
|
3
4
|
require 'ostruct'
|
4
5
|
|
6
|
+
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
7
|
+
|
8
|
+
require 'c7decrypt'
|
9
|
+
|
5
10
|
options = OpenStruct.new
|
6
11
|
options.string = nil
|
7
12
|
options.file = nil
|
8
13
|
|
9
|
-
OptionParser.new do |opts|
|
14
|
+
opt_parser = OptionParser.new do |opts|
|
10
15
|
opts.banner = "Usage: cdecrypt.rb [options] [hash/file]"
|
11
16
|
|
12
17
|
opts.on("-s", "--string [HASH]", "A single encrypted hash string") do |v|
|
@@ -26,7 +31,21 @@ OptionParser.new do |opts|
|
|
26
31
|
puts ""
|
27
32
|
exit
|
28
33
|
end
|
29
|
-
end
|
34
|
+
end
|
35
|
+
|
36
|
+
opt_parser.parse!
|
37
|
+
|
38
|
+
if options.string.nil? &&
|
39
|
+
options.file.nil?
|
40
|
+
|
41
|
+
puts ""
|
42
|
+
puts opt_parser
|
43
|
+
puts ""
|
44
|
+
puts "Example: ruby cdecrypt.rb -s 04480E051A33490E"
|
45
|
+
puts "Example: ruby cdecrypt.rb -f ../spec/example_configs/simple_canned_example.txt"
|
46
|
+
puts ""
|
47
|
+
exit
|
48
|
+
end
|
30
49
|
|
31
50
|
if options.string
|
32
51
|
puts C7Decrypt.decrypt(options.string)
|
data/lib/c7decrypt/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c7decrypt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ dependencies: []
|
|
14
14
|
description: A library for decoding Cisco Type 7 passwords
|
15
15
|
email: claudijd@yahoo.com
|
16
16
|
executables:
|
17
|
-
- c7decrypt
|
17
|
+
- c7decrypt
|
18
18
|
extensions: []
|
19
19
|
extra_rdoc_files: []
|
20
20
|
files:
|
@@ -26,7 +26,7 @@ files:
|
|
26
26
|
- spec/example_configs/empty_example.txt
|
27
27
|
- spec/example_configs/simple_canned_example.txt
|
28
28
|
- spec/spec_helper.rb
|
29
|
-
- bin/c7decrypt
|
29
|
+
- bin/c7decrypt
|
30
30
|
- .gitignore
|
31
31
|
- .rspec
|
32
32
|
- .travis.yml
|