sparoid 1.0.2 → 1.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sparoid/cli.rb +5 -6
- data/lib/sparoid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 594f1917e9cea3e563dcb027f0fb0ddc9fc41e4a0240a405b7fbba8445de61d9
|
4
|
+
data.tar.gz: 7d39ad302157dfce633b339338e6564d407074556614422efc71b3e645272ac2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c037f995e1fd41822c9b726e7d79e2fc065a75dff5697df4182b6e6294889c305f2d224bf6436bd4f26e4e790316d507cffd2dc58d7f6041cf6e4a6484e3098
|
7
|
+
data.tar.gz: 2478cbdb04f16035a93c37711a1bb7eaab1cd7482a6c80418ba71f60c276d356513d1210b51615ea984167ba9b654cc1bf51c4d4899e37894a348abdfaa7e76a
|
data/CHANGELOG.md
CHANGED
data/lib/sparoid/cli.rb
CHANGED
@@ -8,23 +8,22 @@ module Sparoid
|
|
8
8
|
class CLI < Thor
|
9
9
|
desc "auth HOST [PORT]", "Send a authorization packet"
|
10
10
|
method_option :config, desc: "Path to a config file, INI format, with key and hmac-key"
|
11
|
-
method_option :fdpass,
|
12
|
-
type: :numeric,
|
13
|
-
desc: "After sending, open a TCP connection and pass the FD back to the calling process. \
|
14
|
-
For use with OpenSSH ProxyCommand and ProxyUseFdpass"
|
15
11
|
def auth(host, port = 8484)
|
16
12
|
config = File.expand_path(options[:config] || "~/.sparoid.ini")
|
17
13
|
abort "Config '#{config}' not found" unless File.exist? config
|
18
14
|
|
19
15
|
key, hmac_key = get_keys(parse_ini(config))
|
20
16
|
Sparoid.auth(key, hmac_key, host, port.to_i)
|
21
|
-
|
17
|
+
rescue StandardError => e
|
18
|
+
abort e.message
|
22
19
|
end
|
23
20
|
|
24
|
-
desc "connect", "Send a SPA, TCP connect, and then pass the FD back to the parent"
|
21
|
+
desc "connect HOST PORT [SPA-PORT]", "Send a SPA, TCP connect, and then pass the FD back to the parent"
|
25
22
|
def connect(host, port, spa_port = 8484)
|
26
23
|
auth(host, spa_port)
|
27
24
|
Sparoid.fdpass(host, port)
|
25
|
+
rescue StandardError => e
|
26
|
+
abort e.message
|
28
27
|
end
|
29
28
|
|
30
29
|
desc "keygen", "Generate an encryption key and a HMAC key"
|
data/lib/sparoid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sparoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl Hörberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|