hrr_rb_ssh 0.4.0.pre2 → 0.4.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ecdsa_sha2/ecdsa_signature_blob.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ecdsa_sha2/public_key_blob.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ecdsa_sha2/signature.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ecdsa_sha2.rb +6 -6
- data/lib/hrr_rb_ssh/algorithm/publickey/ssh_dss/public_key_blob.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ssh_dss/signature.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ssh_dss.rb +4 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ssh_rsa/public_key_blob.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ssh_rsa/signature.rb +2 -4
- data/lib/hrr_rb_ssh/algorithm/publickey/ssh_rsa.rb +4 -4
- data/lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_request.rb +1 -1
- data/lib/hrr_rb_ssh/authentication/method/keyboard_interactive/info_response.rb +1 -1
- data/lib/hrr_rb_ssh/authentication/method/keyboard_interactive.rb +3 -3
- data/lib/hrr_rb_ssh/authentication/method/none.rb +1 -1
- data/lib/hrr_rb_ssh/authentication/method/password.rb +1 -1
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/functionable.rb +2 -2
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/signature_blob.rb +2 -4
- data/lib/hrr_rb_ssh/authentication/method/publickey.rb +3 -3
- data/lib/hrr_rb_ssh/authentication.rb +4 -4
- data/lib/hrr_rb_ssh/codable.rb +11 -19
- data/lib/hrr_rb_ssh/connection/channel.rb +15 -15
- data/lib/hrr_rb_ssh/connection.rb +14 -14
- data/lib/hrr_rb_ssh/message/001_ssh_msg_disconnect.rb +2 -4
- data/lib/hrr_rb_ssh/message/002_ssh_msg_ignore.rb +2 -4
- data/lib/hrr_rb_ssh/message/003_ssh_msg_unimplemented.rb +2 -4
- data/lib/hrr_rb_ssh/message/004_ssh_msg_debug.rb +2 -4
- data/lib/hrr_rb_ssh/message/005_ssh_msg_service_request.rb +2 -4
- data/lib/hrr_rb_ssh/message/006_ssh_msg_service_accept.rb +2 -4
- data/lib/hrr_rb_ssh/message/020_ssh_msg_kexinit.rb +2 -4
- data/lib/hrr_rb_ssh/message/021_ssh_msg_newkeys.rb +2 -4
- data/lib/hrr_rb_ssh/message/030_ssh_msg_kex_dh_gex_request_old.rb +2 -4
- data/lib/hrr_rb_ssh/message/030_ssh_msg_kexdh_init.rb +2 -4
- data/lib/hrr_rb_ssh/message/030_ssh_msg_kexecdh_init.rb +2 -4
- data/lib/hrr_rb_ssh/message/031_ssh_msg_kex_dh_gex_group.rb +2 -4
- data/lib/hrr_rb_ssh/message/031_ssh_msg_kexdh_reply.rb +2 -4
- data/lib/hrr_rb_ssh/message/031_ssh_msg_kexecdh_reply.rb +2 -4
- data/lib/hrr_rb_ssh/message/032_ssh_msg_kex_dh_gex_init.rb +2 -4
- data/lib/hrr_rb_ssh/message/033_ssh_msg_kex_dh_gex_reply.rb +2 -4
- data/lib/hrr_rb_ssh/message/034_ssh_msg_kex_dh_gex_request.rb +2 -4
- data/lib/hrr_rb_ssh/message/050_ssh_msg_userauth_request.rb +2 -4
- data/lib/hrr_rb_ssh/message/051_ssh_msg_userauth_failure.rb +2 -4
- data/lib/hrr_rb_ssh/message/052_ssh_msg_userauth_success.rb +2 -4
- data/lib/hrr_rb_ssh/message/060_ssh_msg_userauth_info_request.rb +2 -4
- data/lib/hrr_rb_ssh/message/060_ssh_msg_userauth_pk_ok.rb +2 -4
- data/lib/hrr_rb_ssh/message/061_ssh_msg_userauth_info_response.rb +2 -4
- data/lib/hrr_rb_ssh/message/080_ssh_msg_global_request.rb +2 -4
- data/lib/hrr_rb_ssh/message/081_ssh_msg_request_success.rb +2 -4
- data/lib/hrr_rb_ssh/message/082_ssh_msg_request_failure.rb +2 -4
- data/lib/hrr_rb_ssh/message/090_ssh_msg_channel_open.rb +2 -4
- data/lib/hrr_rb_ssh/message/091_ssh_msg_channel_open_confirmation.rb +2 -4
- data/lib/hrr_rb_ssh/message/092_ssh_msg_channel_open_failure.rb +2 -4
- data/lib/hrr_rb_ssh/message/093_ssh_msg_channel_window_adjust.rb +2 -4
- data/lib/hrr_rb_ssh/message/094_ssh_msg_channel_data.rb +2 -4
- data/lib/hrr_rb_ssh/message/095_ssh_msg_channel_extended_data.rb +2 -4
- data/lib/hrr_rb_ssh/message/096_ssh_msg_channel_eof.rb +2 -4
- data/lib/hrr_rb_ssh/message/097_ssh_msg_channel_close.rb +2 -4
- data/lib/hrr_rb_ssh/message/098_ssh_msg_channel_request.rb +2 -4
- data/lib/hrr_rb_ssh/message/099_ssh_msg_channel_success.rb +2 -4
- data/lib/hrr_rb_ssh/message/100_ssh_msg_channel_failure.rb +2 -4
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman/h0.rb +2 -4
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman.rb +5 -5
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman_group_exchange/h0.rb +2 -4
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman_group_exchange.rb +9 -9
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman/h0.rb +2 -4
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman.rb +5 -5
- data/lib/hrr_rb_ssh/transport.rb +13 -13
- data/lib/hrr_rb_ssh/version.rb +1 -1
- metadata +1 -1
@@ -130,7 +130,7 @@ module HrrRbSsh
|
|
130
130
|
|
131
131
|
def global_request payload
|
132
132
|
log_info { 'received ' + Message::SSH_MSG_GLOBAL_REQUEST::ID }
|
133
|
-
message = Message::SSH_MSG_GLOBAL_REQUEST.
|
133
|
+
message = Message::SSH_MSG_GLOBAL_REQUEST.new(logger: logger).decode payload
|
134
134
|
begin
|
135
135
|
@global_request_handler.request message
|
136
136
|
rescue
|
@@ -165,7 +165,7 @@ module HrrRbSsh
|
|
165
165
|
|
166
166
|
def channel_open payload
|
167
167
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_OPEN::ID }
|
168
|
-
message = Message::SSH_MSG_CHANNEL_OPEN.
|
168
|
+
message = Message::SSH_MSG_CHANNEL_OPEN.new(logger: logger).decode payload
|
169
169
|
begin
|
170
170
|
channel = Channel.new self, message, logger: logger
|
171
171
|
@channels[channel.local_channel] = channel
|
@@ -208,7 +208,7 @@ module HrrRbSsh
|
|
208
208
|
|
209
209
|
def channel_open_confirmation payload
|
210
210
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_OPEN_CONFIRMATION::ID }
|
211
|
-
message = Message::SSH_MSG_CHANNEL_OPEN_CONFIRMATION.
|
211
|
+
message = Message::SSH_MSG_CHANNEL_OPEN_CONFIRMATION.new(logger: logger).decode payload
|
212
212
|
channel = @channels[message[:'recipient channel']]
|
213
213
|
channel.set_remote_parameters message
|
214
214
|
channel.start
|
@@ -216,42 +216,42 @@ module HrrRbSsh
|
|
216
216
|
|
217
217
|
def channel_request payload
|
218
218
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_REQUEST::ID }
|
219
|
-
message = Message::SSH_MSG_CHANNEL_REQUEST.
|
219
|
+
message = Message::SSH_MSG_CHANNEL_REQUEST.new(logger: logger).decode payload
|
220
220
|
local_channel = message[:'recipient channel']
|
221
221
|
@channels[local_channel].receive_message_queue.enq message
|
222
222
|
end
|
223
223
|
|
224
224
|
def channel_window_adjust payload
|
225
225
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_WINDOW_ADJUST::ID }
|
226
|
-
message = Message::SSH_MSG_CHANNEL_WINDOW_ADJUST.
|
226
|
+
message = Message::SSH_MSG_CHANNEL_WINDOW_ADJUST.new(logger: logger).decode payload
|
227
227
|
local_channel = message[:'recipient channel']
|
228
228
|
@channels[local_channel].receive_message_queue.enq message
|
229
229
|
end
|
230
230
|
|
231
231
|
def channel_data payload
|
232
232
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_DATA::ID }
|
233
|
-
message = Message::SSH_MSG_CHANNEL_DATA.
|
233
|
+
message = Message::SSH_MSG_CHANNEL_DATA.new(logger: logger).decode payload
|
234
234
|
local_channel = message[:'recipient channel']
|
235
235
|
@channels[local_channel].receive_message_queue.enq message
|
236
236
|
end
|
237
237
|
|
238
238
|
def channel_extended_data payload
|
239
239
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_EXTENDED_DATA::ID }
|
240
|
-
message = Message::SSH_MSG_CHANNEL_EXTENDED_DATA.
|
240
|
+
message = Message::SSH_MSG_CHANNEL_EXTENDED_DATA.new(logger: logger).decode payload
|
241
241
|
local_channel = message[:'recipient channel']
|
242
242
|
@channels[local_channel].receive_message_queue.enq message
|
243
243
|
end
|
244
244
|
|
245
245
|
def channel_eof payload
|
246
246
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_EOF::ID }
|
247
|
-
message = Message::SSH_MSG_CHANNEL_EOF.
|
247
|
+
message = Message::SSH_MSG_CHANNEL_EOF.new(logger: logger).decode payload
|
248
248
|
local_channel = message[:'recipient channel']
|
249
249
|
@channels[local_channel].receive_message_queue.enq message
|
250
250
|
end
|
251
251
|
|
252
252
|
def channel_close payload
|
253
253
|
log_info { 'received ' + Message::SSH_MSG_CHANNEL_CLOSE::ID }
|
254
|
-
message = Message::SSH_MSG_CHANNEL_CLOSE.
|
254
|
+
message = Message::SSH_MSG_CHANNEL_CLOSE.new(logger: logger).decode payload
|
255
255
|
local_channel = message[:'recipient channel']
|
256
256
|
channel = @channels[local_channel]
|
257
257
|
channel.close
|
@@ -267,7 +267,7 @@ module HrrRbSsh
|
|
267
267
|
message = {
|
268
268
|
:'message number' => Message::SSH_MSG_REQUEST_SUCCESS::VALUE,
|
269
269
|
}
|
270
|
-
payload = Message::SSH_MSG_REQUEST_SUCCESS.
|
270
|
+
payload = Message::SSH_MSG_REQUEST_SUCCESS.new(logger: logger).encode message
|
271
271
|
@authentication.send payload
|
272
272
|
end
|
273
273
|
|
@@ -275,12 +275,12 @@ module HrrRbSsh
|
|
275
275
|
message = {
|
276
276
|
:'message number' => Message::SSH_MSG_REQUEST_FAILURE::VALUE,
|
277
277
|
}
|
278
|
-
payload = Message::SSH_MSG_REQUEST_FAILURE.
|
278
|
+
payload = Message::SSH_MSG_REQUEST_FAILURE.new(logger: logger).encode message
|
279
279
|
@authentication.send payload
|
280
280
|
end
|
281
281
|
|
282
282
|
def send_channel_open message
|
283
|
-
payload = Message::SSH_MSG_CHANNEL_OPEN.
|
283
|
+
payload = Message::SSH_MSG_CHANNEL_OPEN.new(logger: logger).encode message
|
284
284
|
@authentication.send payload
|
285
285
|
end
|
286
286
|
|
@@ -293,7 +293,7 @@ module HrrRbSsh
|
|
293
293
|
:'initial window size' => channel.local_window_size,
|
294
294
|
:'maximum packet size' => channel.local_maximum_packet_size,
|
295
295
|
}
|
296
|
-
payload = Message::SSH_MSG_CHANNEL_OPEN_CONFIRMATION.
|
296
|
+
payload = Message::SSH_MSG_CHANNEL_OPEN_CONFIRMATION.new(logger: logger).encode message
|
297
297
|
@authentication.send payload
|
298
298
|
end
|
299
299
|
|
@@ -305,7 +305,7 @@ module HrrRbSsh
|
|
305
305
|
:'description' => description,
|
306
306
|
:'language tag' => "",
|
307
307
|
}
|
308
|
-
payload = Message::SSH_MSG_CHANNEL_OPEN_FAILURE.
|
308
|
+
payload = Message::SSH_MSG_CHANNEL_OPEN_FAILURE.new(logger: logger).encode message
|
309
309
|
@authentication.send payload
|
310
310
|
end
|
311
311
|
end
|
@@ -6,7 +6,7 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
9
|
+
class SSH_MSG_DISCONNECT
|
10
10
|
module ReasonCode
|
11
11
|
SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT = 1
|
12
12
|
SSH_DISCONNECT_PROTOCOL_ERROR = 2
|
@@ -25,9 +25,7 @@ module HrrRbSsh
|
|
25
25
|
SSH_DISCONNECT_ILLEGAL_USER_NAME = 15
|
26
26
|
end
|
27
27
|
|
28
|
-
|
29
|
-
include Codable
|
30
|
-
end
|
28
|
+
include Codable
|
31
29
|
|
32
30
|
ID = self.name.split('::').last
|
33
31
|
VALUE = 1
|
@@ -6,10 +6,8 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
10
|
-
|
11
|
-
include Codable
|
12
|
-
end
|
9
|
+
class SSH_MSG_KEX_DH_GEX_REQUEST_OLD
|
10
|
+
include Codable
|
13
11
|
|
14
12
|
ID = self.name.split('::').last
|
15
13
|
VALUE = 30
|
@@ -6,10 +6,8 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
10
|
-
|
11
|
-
include Codable
|
12
|
-
end
|
9
|
+
class SSH_MSG_USERAUTH_INFO_REQUEST
|
10
|
+
include Codable
|
13
11
|
|
14
12
|
ID = self.name.split('::').last
|
15
13
|
VALUE = 60
|
@@ -6,10 +6,8 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
10
|
-
|
11
|
-
include Codable
|
12
|
-
end
|
9
|
+
class SSH_MSG_USERAUTH_INFO_RESPONSE
|
10
|
+
include Codable
|
13
11
|
|
14
12
|
ID = self.name.split('::').last
|
15
13
|
VALUE = 61
|
@@ -6,10 +6,8 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
10
|
-
|
11
|
-
include Codable
|
12
|
-
end
|
9
|
+
class SSH_MSG_CHANNEL_OPEN_CONFIRMATION
|
10
|
+
include Codable
|
13
11
|
|
14
12
|
ID = self.name.split('::').last
|
15
13
|
VALUE = 91
|
@@ -6,7 +6,7 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
9
|
+
class SSH_MSG_CHANNEL_OPEN_FAILURE
|
10
10
|
module ReasonCode
|
11
11
|
SSH_OPEN_ADMINISTRATIVELY_PROHIBITED = 1
|
12
12
|
SSH_OPEN_CONNECT_FAILED = 2
|
@@ -14,9 +14,7 @@ module HrrRbSsh
|
|
14
14
|
SSH_OPEN_RESOURCE_SHORTAGE = 4
|
15
15
|
end
|
16
16
|
|
17
|
-
|
18
|
-
include Codable
|
19
|
-
end
|
17
|
+
include Codable
|
20
18
|
|
21
19
|
ID = self.name.split('::').last
|
22
20
|
VALUE = 92
|
@@ -6,10 +6,8 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
10
|
-
|
11
|
-
include Codable
|
12
|
-
end
|
9
|
+
class SSH_MSG_CHANNEL_WINDOW_ADJUST
|
10
|
+
include Codable
|
13
11
|
|
14
12
|
ID = self.name.split('::').last
|
15
13
|
VALUE = 93
|
@@ -6,14 +6,12 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
9
|
+
class SSH_MSG_CHANNEL_EXTENDED_DATA
|
10
10
|
module DataTypeCode
|
11
11
|
SSH_EXTENDED_DATA_STDERR = 1
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
|
-
include Codable
|
16
|
-
end
|
14
|
+
include Codable
|
17
15
|
|
18
16
|
ID = self.name.split('::').last
|
19
17
|
VALUE = 95
|
@@ -6,7 +6,7 @@ require 'hrr_rb_ssh/codable'
|
|
6
6
|
|
7
7
|
module HrrRbSsh
|
8
8
|
module Message
|
9
|
-
|
9
|
+
class SSH_MSG_CHANNEL_REQUEST
|
10
10
|
module SignalName
|
11
11
|
ABRT = 'ABRT'
|
12
12
|
ALRM = 'ALRM'
|
@@ -82,9 +82,7 @@ module HrrRbSsh
|
|
82
82
|
TTY_OP_OSPEED = 129
|
83
83
|
end
|
84
84
|
|
85
|
-
|
86
|
-
include Codable
|
87
|
-
end
|
85
|
+
include Codable
|
88
86
|
|
89
87
|
ID = self.name.split('::').last
|
90
88
|
VALUE = 98
|