abalone 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/bin/abalone +3 -0
- data/lib/abalone.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8bd7313af2ef199663a12440718471b9d2eff311
|
4
|
+
data.tar.gz: fa3cf73aeda53912d5125f2a762362b43f85aca8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ca11182e225316c971cee0f75f7d6cd27e137d0ded674810379a6e6576ff09d386d39d367a3dc2f32108c44d699b4ddfc42c5777dc150882413991702596bb9
|
7
|
+
data.tar.gz: 7c8e6175f921726e7ddcfcb4f1b9a7f147e314ebcb11d3dc99b0ece9f85c58485865c1408dc3cfd793623b7e36dbb47f86067b8537ba2c507210fa0e778b0b84
|
data/README.md
CHANGED
@@ -38,6 +38,10 @@ can set several options:
|
|
38
38
|
* `:bind`
|
39
39
|
* The hostname or IP address of the interface to listen on.
|
40
40
|
* Default value: `0.0.0.0` (listen to all interfaces.)
|
41
|
+
* `:bannerfile`
|
42
|
+
* File to display before login. This does not interpret special characters the way `getty` does.
|
43
|
+
* `true`, `false`, or filename to display.
|
44
|
+
* Default value: `false`, or `/etc/issue.net` if set to `true`.
|
41
45
|
* `:logfile`
|
42
46
|
* The path of a file to log to.
|
43
47
|
* Default value: Log only to `STDERR`. If you pass `-l` at the command line
|
data/bin/abalone
CHANGED
@@ -71,6 +71,9 @@ if options[:params].class == Hash
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
# This is the unix standard, so we'll default to this if enabled, but unspecified
|
75
|
+
options[:bannerfile] = '/etc/issue.net' if options[:bannerfile] == true
|
76
|
+
|
74
77
|
raise 'Specify only one of a login command or SSH settings' if options.include? :command and options.include? :ssh
|
75
78
|
|
76
79
|
if options.include? :command
|
data/lib/abalone.rb
CHANGED
@@ -37,6 +37,11 @@ class Abalone < Sinatra::Base
|
|
37
37
|
warn("websocket opened")
|
38
38
|
ENV['TERM'] ||= 'xterm' # make sure we've got a somewhat sane environment
|
39
39
|
|
40
|
+
if settings.respond_to?(:bannerfile)
|
41
|
+
ws.send({'data' => File.read(settings.bannerfile).encode(crlf_newline: true)}.to_json)
|
42
|
+
ws.send({'data' => "\r\n\r\n"}.to_json)
|
43
|
+
end
|
44
|
+
|
40
45
|
reader, @writer, @pid = PTY.spawn(*shell_command)
|
41
46
|
@writer.winsize = [24,80]
|
42
47
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abalone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|