console1984 0.1.29 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/console1984/command_executor.rb +18 -0
- data/lib/console1984/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: 534f4adb54490c9f5cb39a9e068e9d15ac2d84d05a7e7ed97e287b132021b52d
|
4
|
+
data.tar.gz: 2d6d1f7059db9bb2c4561136b45ef57b74a8ab8f86dd59a2a80fd6c117bdd5f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac7e2d0297fe375b638e8f1b1887889296fca195fd54cd489605420866399ff85506e525d4a173c95ccca988ed97767a7302d0a821cd7c0a36f7fe993a07d86a
|
7
|
+
data.tar.gz: 69f8d533ea41a90b038b713875d125f156bfebdec950c1a4c72a326a05ea551d01c170766fe941d2cb69e5ff55ba564953834e2759afe453eece87ee4c2a8b08
|
@@ -29,6 +29,8 @@ class Console1984::CommandExecutor
|
|
29
29
|
# We detected that a forbidden command was executed. We exit IRB right away.
|
30
30
|
flag_suspicious(commands, error: error)
|
31
31
|
Console1984.supervisor.exit_irb
|
32
|
+
rescue => error
|
33
|
+
raise encrypting_error(error)
|
32
34
|
ensure
|
33
35
|
run_as_system { session_logger.after_executing commands }
|
34
36
|
end
|
@@ -97,4 +99,20 @@ class Console1984::CommandExecutor
|
|
97
99
|
ensure
|
98
100
|
@executing_user_command = original_value
|
99
101
|
end
|
102
|
+
|
103
|
+
def encrypting_error(error)
|
104
|
+
if error.respond_to?(:inspect)
|
105
|
+
def error.inspect
|
106
|
+
Console1984.command_executor.execute_in_protected_mode { method(:inspect).super_method.call }
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
if error.respond_to?(:to_s)
|
111
|
+
def error.to_s
|
112
|
+
Console1984.command_executor.execute_in_protected_mode { method(:to_s).super_method.call }
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
error
|
117
|
+
end
|
100
118
|
end
|
data/lib/console1984/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console1984
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jorge Manrubia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|