thieve 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/bin/thieve +13 -5
- metadata +4 -5
- data/lib/string.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d3ecda5d73f40c593b0a03d850151e232e9769f
|
4
|
+
data.tar.gz: 3893bd040172eecd8d6a815579ad1eb19d362c57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c64086e8cf3e9a434c008e6db39aad325bc885e1169f34367edc9ed5ffc0ea9c446a80194657cbf86d9e91ab495e7d2a11319d0a2f65a395e040370a51c5b8c3
|
7
|
+
data.tar.gz: 18d938a5115a2d6889242b62bb00f8d5525c47a92be826e2c8fdcca393b3765611b3a4bbdb6ca82cfa84514172505c8c31eedfcbc5e2dedeec34b581f5d3d31d
|
data/bin/thieve
CHANGED
@@ -3,7 +3,6 @@
|
|
3
3
|
require "colorize"
|
4
4
|
require "io/wait"
|
5
5
|
require "optparse"
|
6
|
-
require "string"
|
7
6
|
require "thieve"
|
8
7
|
|
9
8
|
class ThieveExit
|
@@ -26,8 +25,18 @@ def parse(args)
|
|
26
25
|
"fingerprints, and attempts to match keys with certs."
|
27
26
|
|
28
27
|
parser = OptionParser.new do |opts|
|
28
|
+
opts.summary_width = 23
|
29
|
+
|
29
30
|
opts.banner = "Usage: #{File.basename($0)} [OPTIONS] <dir>..."
|
30
31
|
|
32
|
+
opts.on("", "DESCRIPTION")
|
33
|
+
|
34
|
+
info.scan(/\S.{0,#{76}}\S(?=\s|$)|\S+/).each do |line|
|
35
|
+
opts.on(" #{line}")
|
36
|
+
end
|
37
|
+
|
38
|
+
opts.on("", "OPTIONS")
|
39
|
+
|
31
40
|
opts.on(
|
32
41
|
"-e",
|
33
42
|
"--export=DIRECTORY",
|
@@ -52,8 +61,6 @@ def parse(args)
|
|
52
61
|
) do
|
53
62
|
options["verbose"] = true
|
54
63
|
end
|
55
|
-
|
56
|
-
opts.on("", info.word_wrap)
|
57
64
|
end
|
58
65
|
|
59
66
|
begin
|
@@ -116,12 +123,13 @@ rescue Thieve::Error => e
|
|
116
123
|
rescue Exception => e
|
117
124
|
$stderr.puts
|
118
125
|
$stderr.puts "Oops! Looks like an error has occured! If the " \
|
119
|
-
"error persists, file a bug at:"
|
126
|
+
"error persists, file a bug at:"
|
120
127
|
$stderr.puts
|
121
128
|
$stderr.puts " https://gitlab.com/mjwhitta/thieve/issues"
|
122
129
|
$stderr.puts
|
123
130
|
$stderr.puts "Maybe the message below will help. If not, you " \
|
124
|
-
"can use the --verbose flag to get
|
131
|
+
"can use the --verbose flag to get"
|
132
|
+
$stderr.puts "a backtrace."
|
125
133
|
|
126
134
|
$stderr.puts e.message.white.on_red
|
127
135
|
if (options["verbose"])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thieve
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
version: '0.1'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.1.
|
62
|
+
version: 0.1.4
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -69,7 +69,7 @@ dependencies:
|
|
69
69
|
version: '0.1'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 0.1.
|
72
|
+
version: 0.1.4
|
73
73
|
description: This ruby gem searches through provided directories, looking for private/public
|
74
74
|
keys and certs. Then extracts, fingerprints, and attempts to match keys with certs.
|
75
75
|
email: mjwhitta@gmail.com
|
@@ -79,7 +79,6 @@ extensions: []
|
|
79
79
|
extra_rdoc_files: []
|
80
80
|
files:
|
81
81
|
- bin/thieve
|
82
|
-
- lib/string.rb
|
83
82
|
- lib/thieve.rb
|
84
83
|
- lib/thieve/error.rb
|
85
84
|
- lib/thieve/error/executable_not_found.rb
|
data/lib/string.rb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# Modify String class to allow for rsplit and word wrap
|
2
|
-
class String
|
3
|
-
def rsplit(pattern)
|
4
|
-
ret = rpartition(pattern)
|
5
|
-
ret.delete_at(1)
|
6
|
-
return ret
|
7
|
-
end
|
8
|
-
|
9
|
-
def word_wrap(width = 80)
|
10
|
-
return scan(/\S.{0,#{width}}\S(?=\s|$)|\S+/).join("\n")
|
11
|
-
end
|
12
|
-
end
|