teuton 2.9.2 → 2.9.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/docs/changelog/changelog.2.md +10 -0
- data/docs/install/manual.md +1 -1
- data/docs/install/t-node.md +1 -1
- data/lib/teuton/case/case.rb +1 -1
- data/lib/teuton/case/dsl/run_script.rb +1 -1
- data/lib/teuton/case/execute/execute_telnet.rb +4 -4
- data/lib/teuton/check/dsl/all.rb +1 -1
- data/lib/teuton/utils/configfile_reader.rb +12 -2
- data/lib/teuton/utils/project.rb +1 -3
- data/lib/teuton/version.rb +1 -1
- metadata +9 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b4752e08b15fd862f420e1d48adbd9993d85d195d1b4c4e3a038fd49496c266
|
4
|
+
data.tar.gz: 35b22222f598310ccb28f208a56a4ae6923585815b41cceea7ed1d3546c6b914
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94c0548eea0557f8974d2f11640aa292cb6beaa446ea11f5b8c8927f0fafd846bf03bdb7d9114c82447e149534bc350521ba3998c441996c95aecc1a07341551
|
7
|
+
data.tar.gz: e6086e5451d2846bde79419d8cc3cf0c6d8dd332c966e2fee3c19f54c66569cc5f3c62e8aeb108a9c6f2e6cfe63e4190d70491b5aeb99d7dbc75cfe3f07991bc
|
@@ -107,3 +107,13 @@ DSL send:
|
|
107
107
|
## [2.9.1] 20231117
|
108
108
|
|
109
109
|
- [FIX] Config option `tt_include` doubled readed data on Windows platforms.
|
110
|
+
|
111
|
+
## [2.9.2] 20231201
|
112
|
+
|
113
|
+
- [FIX] Change error message when running a non-existent challenge
|
114
|
+
```
|
115
|
+
❯ teuton run example/foo
|
116
|
+
[ERROR] Cannot find main file!
|
117
|
+
/home/username/example/foo/start.rb
|
118
|
+
or /home/username/example/foo.rb
|
119
|
+
```
|
data/docs/install/manual.md
CHANGED
data/docs/install/t-node.md
CHANGED
data/lib/teuton/case/case.rb
CHANGED
@@ -21,7 +21,7 @@ class Case
|
|
21
21
|
attr_accessor :conn_status # Updated by ExecuteManager
|
22
22
|
|
23
23
|
attr_reader :id
|
24
|
-
attr_reader :config
|
24
|
+
attr_reader :config # Readed by ExecuteManager
|
25
25
|
attr_reader :uniques
|
26
26
|
attr_reader :skip
|
27
27
|
@@id = "01" # First case ID value
|
@@ -5,7 +5,7 @@ module DSL
|
|
5
5
|
def run_script(script, args = {})
|
6
6
|
items = script.split(" ")
|
7
7
|
if items.size == 1
|
8
|
-
shell = args[:shell] || (
|
8
|
+
shell = args[:shell] || (get(:shell) != "NODATA" ? get(:shell) : nil)
|
9
9
|
script = "#{shell} #{script}" if shell
|
10
10
|
script = "#{script} #{args[:args]} " if args[:args]
|
11
11
|
end
|
@@ -17,7 +17,7 @@ class ExecuteTelnet < ExecuteBase
|
|
17
17
|
h = Net::Telnet.new(
|
18
18
|
"Host" => ip,
|
19
19
|
"Timeout" => 30,
|
20
|
-
"Prompt" => /login|teuton|[$%#>]
|
20
|
+
"Prompt" => /login|teuton|[$%#>]|PC1>/
|
21
21
|
)
|
22
22
|
# "Prompt" => Regexp.new(username[1, 40]))
|
23
23
|
# "Prompt" => /[$%#>] \z/n)
|
@@ -31,18 +31,18 @@ class ExecuteTelnet < ExecuteBase
|
|
31
31
|
rescue Net::OpenTimeout
|
32
32
|
sessions[hostname] = :nosession
|
33
33
|
conn_status[hostname] = :open_timeout
|
34
|
-
verbose Rainbow(Application.instance.letter[:error]).red.bright
|
34
|
+
# verbose Rainbow(Application.instance.letter[:error]).red.bright
|
35
35
|
log(" ExceptionType=<Net::OpenTimeout> doing <telnet #{ip}>", :error)
|
36
36
|
log(" └── Revise host IP!", :warn)
|
37
37
|
rescue Net::ReadTimeout
|
38
38
|
sessions[hostname] = :nosession
|
39
39
|
conn_status[hostname] = :read_timeout
|
40
|
-
verbose Rainbow(Application.instance.letter[:error]).red.bright
|
40
|
+
# verbose Rainbow(Application.instance.letter[:error]).red.bright
|
41
41
|
log(" ExceptionType=<Net::ReadTimeout> doing <telnet #{ip}>", :error)
|
42
42
|
rescue => e
|
43
43
|
sessions[hostname] = :nosession
|
44
44
|
conn_status[hostname] = :error
|
45
|
-
verbose Rainbow(Application.instance.letter[:error]).red.bright
|
45
|
+
# verbose Rainbow(Application.instance.letter[:error]).red.bright
|
46
46
|
log(" ExceptionType=<#{e.class}> doing telnet on <#{username}@#{ip}>" \
|
47
47
|
" exec: #{action[:command]}", :error)
|
48
48
|
log(" └── username=<#{username}>, password=<#{password}>," \
|
data/lib/teuton/check/dsl/all.rb
CHANGED
@@ -85,9 +85,19 @@ module ConfigFileReader
|
|
85
85
|
begin
|
86
86
|
ext = File.extname(filename)
|
87
87
|
if exts[:yaml].include? ext
|
88
|
-
|
88
|
+
begin
|
89
|
+
data[:cases] << YAML.load(File.open(filename))
|
90
|
+
rescue
|
91
|
+
msg = "[ERROR] Loading configuration file(#{filename})"
|
92
|
+
warn msg
|
93
|
+
end
|
89
94
|
elsif exts[:json].include? ext
|
90
|
-
|
95
|
+
begin
|
96
|
+
data[:cases] = JSON.parse(File.read(filename), symbolize_names: true)
|
97
|
+
rescue
|
98
|
+
msg = "[ERROR] Loading configuration file(#{filename})"
|
99
|
+
warn msg
|
100
|
+
end
|
91
101
|
elsif File.file? filename
|
92
102
|
msg = "[ERROR] Loading configuration files: " \
|
93
103
|
" No yaml/json valid extension " \
|
data/lib/teuton/utils/project.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# Development in progress...
|
2
|
-
|
3
1
|
require_relative "name_file_finder"
|
4
2
|
|
5
3
|
class Project
|
@@ -21,7 +19,7 @@ class Project
|
|
21
19
|
@project[:ialias] = {} # Hash of Internal alias
|
22
20
|
@project[:macros] = {} # Hash of macros
|
23
21
|
@project[:groups] = [] # Array of groups
|
24
|
-
@project[:uses] = []
|
22
|
+
@project[:uses] = [] # TODO: Array of used files
|
25
23
|
@project[:hall_of_fame] = []
|
26
24
|
end
|
27
25
|
|
data/lib/teuton/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: teuton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Vargas Ruiz
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-04-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: rainbow
|
@@ -44,14 +43,14 @@ dependencies:
|
|
44
43
|
requirements:
|
45
44
|
- - "~>"
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version: '7.
|
46
|
+
version: '7.2'
|
48
47
|
type: :runtime
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - "~>"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: '7.
|
53
|
+
version: '7.2'
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
55
|
name: net-telnet
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,28 +71,28 @@ dependencies:
|
|
72
71
|
requirements:
|
73
72
|
- - "~>"
|
74
73
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2.
|
74
|
+
version: '2.8'
|
76
75
|
type: :runtime
|
77
76
|
prerelease: false
|
78
77
|
version_requirements: !ruby/object:Gem::Requirement
|
79
78
|
requirements:
|
80
79
|
- - "~>"
|
81
80
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
81
|
+
version: '2.8'
|
83
82
|
- !ruby/object:Gem::Dependency
|
84
83
|
name: thor
|
85
84
|
requirement: !ruby/object:Gem::Requirement
|
86
85
|
requirements:
|
87
86
|
- - "~>"
|
88
87
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
88
|
+
version: '1.3'
|
90
89
|
type: :runtime
|
91
90
|
prerelease: false
|
92
91
|
version_requirements: !ruby/object:Gem::Requirement
|
93
92
|
requirements:
|
94
93
|
- - "~>"
|
95
94
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
95
|
+
version: '1.3'
|
97
96
|
- !ruby/object:Gem::Dependency
|
98
97
|
name: terminal-table
|
99
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -351,7 +350,6 @@ homepage: https://github.com/teuton-software/teuton
|
|
351
350
|
licenses:
|
352
351
|
- GPL-3.0
|
353
352
|
metadata: {}
|
354
|
-
post_install_message:
|
355
353
|
rdoc_options: []
|
356
354
|
require_paths:
|
357
355
|
- lib
|
@@ -366,8 +364,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
364
|
- !ruby/object:Gem::Version
|
367
365
|
version: '0'
|
368
366
|
requirements: []
|
369
|
-
rubygems_version: 3.2
|
370
|
-
signing_key:
|
367
|
+
rubygems_version: 3.6.2
|
371
368
|
specification_version: 4
|
372
369
|
summary: Teuton (Infrastructure test)
|
373
370
|
test_files: []
|