hrr_rb_ssh 0.1.4 → 0.1.5
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/demo/server.rb +10 -2
- data/lib/hrr_rb_ssh/authentication/method/none.rb +1 -1
- data/lib/hrr_rb_ssh/authentication/method/password.rb +2 -2
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/ecdsa_signature_blob.rb +27 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/public_key_blob.rb +28 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/signature.rb +27 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256/signature_blob.rb +33 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp256.rb +84 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/ecdsa_signature_blob.rb +27 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/public_key_blob.rb +28 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/signature.rb +27 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384/signature_blob.rb +33 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp384.rb +84 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/ecdsa_signature_blob.rb +27 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/public_key_blob.rb +28 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/signature.rb +27 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521/signature_blob.rb +33 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ecdsa_sha2_nistp521.rb +84 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss/public_key_blob.rb +5 -5
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss/signature.rb +2 -2
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss/signature_blob.rb +8 -8
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_dss.rb +24 -24
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa/public_key_blob.rb +3 -3
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa/signature.rb +2 -2
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa/signature_blob.rb +8 -8
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm/ssh_rsa.rb +19 -19
- data/lib/hrr_rb_ssh/authentication/method/publickey/algorithm.rb +3 -0
- data/lib/hrr_rb_ssh/authentication/method/publickey/context.rb +7 -7
- data/lib/hrr_rb_ssh/authentication/method/publickey.rb +7 -7
- data/lib/hrr_rb_ssh/authentication.rb +6 -6
- data/lib/hrr_rb_ssh/codable.rb +7 -2
- data/lib/hrr_rb_ssh/connection/channel/channel_type/direct_tcpip.rb +102 -0
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/proc_chain/chain_context.rb +26 -0
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/proc_chain.rb +29 -0
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/env/context.rb +2 -2
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/exec/context.rb +1 -1
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/pty_req/context.rb +6 -6
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/subsystem/context.rb +1 -1
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session/request_type/window_change/context.rb +4 -4
- data/lib/hrr_rb_ssh/connection/channel/channel_type/session.rb +42 -0
- data/lib/hrr_rb_ssh/connection/channel/channel_type.rb +1 -0
- data/lib/hrr_rb_ssh/connection/channel.rb +50 -63
- data/lib/hrr_rb_ssh/connection/request_handler/reference_shell_request_handler.rb +29 -9
- data/lib/hrr_rb_ssh/connection.rb +22 -27
- data/lib/hrr_rb_ssh/message/001_ssh_msg_disconnect.rb +4 -4
- data/lib/hrr_rb_ssh/message/002_ssh_msg_ignore.rb +2 -2
- data/lib/hrr_rb_ssh/message/003_ssh_msg_unimplemented.rb +2 -2
- data/lib/hrr_rb_ssh/message/004_ssh_msg_debug.rb +4 -4
- data/lib/hrr_rb_ssh/message/005_ssh_msg_service_request.rb +2 -2
- data/lib/hrr_rb_ssh/message/006_ssh_msg_service_accept.rb +2 -2
- data/lib/hrr_rb_ssh/message/020_ssh_msg_kexinit.rb +29 -29
- data/lib/hrr_rb_ssh/message/021_ssh_msg_newkeys.rb +1 -1
- data/lib/hrr_rb_ssh/message/030_ssh_msg_kex_dh_gex_request_old.rb +2 -2
- data/lib/hrr_rb_ssh/message/030_ssh_msg_kexdh_init.rb +2 -2
- data/lib/hrr_rb_ssh/message/030_ssh_msg_kexecdh_init.rb +24 -0
- data/lib/hrr_rb_ssh/message/031_ssh_msg_kex_dh_gex_group.rb +3 -3
- data/lib/hrr_rb_ssh/message/031_ssh_msg_kexdh_reply.rb +4 -4
- data/lib/hrr_rb_ssh/message/031_ssh_msg_kexecdh_reply.rb +26 -0
- data/lib/hrr_rb_ssh/message/032_ssh_msg_kex_dh_gex_init.rb +2 -2
- data/lib/hrr_rb_ssh/message/033_ssh_msg_kex_dh_gex_reply.rb +4 -4
- data/lib/hrr_rb_ssh/message/034_ssh_msg_kex_dh_gex_request.rb +4 -4
- data/lib/hrr_rb_ssh/message/050_ssh_msg_userauth_request.rb +17 -17
- data/lib/hrr_rb_ssh/message/051_ssh_msg_userauth_failure.rb +3 -3
- data/lib/hrr_rb_ssh/message/052_ssh_msg_userauth_success.rb +1 -1
- data/lib/hrr_rb_ssh/message/060_ssh_msg_userauth_pk_ok.rb +3 -3
- data/lib/hrr_rb_ssh/message/080_ssh_msg_global_request.rb +12 -12
- data/lib/hrr_rb_ssh/message/081_ssh_msg_request_success.rb +5 -5
- data/lib/hrr_rb_ssh/message/082_ssh_msg_request_failure.rb +1 -1
- data/lib/hrr_rb_ssh/message/090_ssh_msg_channel_open.rb +24 -24
- data/lib/hrr_rb_ssh/message/091_ssh_msg_channel_open_confirmation.rb +14 -24
- data/lib/hrr_rb_ssh/message/092_ssh_msg_channel_open_failure.rb +5 -5
- data/lib/hrr_rb_ssh/message/093_ssh_msg_channel_window_adjust.rb +3 -3
- data/lib/hrr_rb_ssh/message/094_ssh_msg_channel_data.rb +3 -3
- data/lib/hrr_rb_ssh/message/095_ssh_msg_channel_extended_data.rb +4 -4
- data/lib/hrr_rb_ssh/message/096_ssh_msg_channel_eof.rb +2 -2
- data/lib/hrr_rb_ssh/message/097_ssh_msg_channel_close.rb +2 -2
- data/lib/hrr_rb_ssh/message/098_ssh_msg_channel_request.rb +51 -51
- data/lib/hrr_rb_ssh/message/099_ssh_msg_channel_success.rb +2 -2
- data/lib/hrr_rb_ssh/message/100_ssh_msg_channel_failure.rb +2 -2
- data/lib/hrr_rb_ssh/message.rb +2 -0
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman/h0.rb +8 -8
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman.rb +13 -13
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman_group_exchange/h0.rb +13 -13
- data/lib/hrr_rb_ssh/transport/kex_algorithm/diffie_hellman_group_exchange.rb +24 -24
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman/h0.rb +29 -0
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman.rb +132 -0
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman_sha2_nistp256.rb +18 -0
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman_sha2_nistp384.rb +18 -0
- data/lib/hrr_rb_ssh/transport/kex_algorithm/elliptic_curve_diffie_hellman_sha2_nistp521.rb +18 -0
- data/lib/hrr_rb_ssh/transport/kex_algorithm.rb +3 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256/ecdsa_signature_blob.rb +23 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256/public_key_blob.rb +25 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256/signature.rb +23 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp256.rb +79 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384/ecdsa_signature_blob.rb +23 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384/public_key_blob.rb +25 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384/signature.rb +23 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp384.rb +80 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521/ecdsa_signature_blob.rb +23 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521/public_key_blob.rb +25 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521/signature.rb +23 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ecdsa_sha2_nistp521.rb +81 -0
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_dss/public_key_blob.rb +5 -5
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_dss/signature.rb +2 -2
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_dss.rb +9 -9
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_rsa/public_key_blob.rb +3 -3
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_rsa/signature.rb +2 -2
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm/ssh_rsa.rb +6 -6
- data/lib/hrr_rb_ssh/transport/server_host_key_algorithm.rb +3 -0
- data/lib/hrr_rb_ssh/transport.rb +30 -30
- data/lib/hrr_rb_ssh/version.rb +1 -1
- metadata +39 -4
- data/lib/hrr_rb_ssh/connection/channel/proc_chain/chain_context.rb +0 -22
- data/lib/hrr_rb_ssh/connection/channel/proc_chain.rb +0 -25
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# vim: et ts=2 sw=2
|
3
|
+
|
4
|
+
require 'hrr_rb_ssh/data_type'
|
5
|
+
require 'hrr_rb_ssh/codable'
|
6
|
+
|
7
|
+
module HrrRbSsh
|
8
|
+
module Message
|
9
|
+
module SSH_MSG_KEXECDH_INIT
|
10
|
+
class << self
|
11
|
+
include Codable
|
12
|
+
end
|
13
|
+
|
14
|
+
ID = self.name.split('::').last
|
15
|
+
VALUE = 30
|
16
|
+
|
17
|
+
DEFINITION = [
|
18
|
+
#[DataType, Field Name]
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::Mpint, :'Q_C'],
|
21
|
+
]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -16,9 +16,9 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::Mpint, 'p'],
|
21
|
-
[DataType::Mpint, 'g'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::Mpint, :'p'],
|
21
|
+
[DataType::Mpint, :'g'],
|
22
22
|
]
|
23
23
|
end
|
24
24
|
end
|
@@ -16,10 +16,10 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::String, 'server public host key and certificates (K_S)'],
|
21
|
-
[DataType::Mpint, 'f'],
|
22
|
-
[DataType::String, 'signature of H'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'server public host key and certificates (K_S)'],
|
21
|
+
[DataType::Mpint, :'f'],
|
22
|
+
[DataType::String, :'signature of H'],
|
23
23
|
]
|
24
24
|
end
|
25
25
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# vim: et ts=2 sw=2
|
3
|
+
|
4
|
+
require 'hrr_rb_ssh/data_type'
|
5
|
+
require 'hrr_rb_ssh/codable'
|
6
|
+
|
7
|
+
module HrrRbSsh
|
8
|
+
module Message
|
9
|
+
module SSH_MSG_KEXECDH_REPLY
|
10
|
+
class << self
|
11
|
+
include Codable
|
12
|
+
end
|
13
|
+
|
14
|
+
ID = self.name.split('::').last
|
15
|
+
VALUE = 31
|
16
|
+
|
17
|
+
DEFINITION = [
|
18
|
+
#[DataType, Field Name]
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'K_S'],
|
21
|
+
[DataType::Mpint, :'Q_S'],
|
22
|
+
[DataType::String, :'signature of H'],
|
23
|
+
]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -16,10 +16,10 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::String, 'server public host key and certificates (K_S)'],
|
21
|
-
[DataType::Mpint, 'f'],
|
22
|
-
[DataType::String, 'signature of H'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'server public host key and certificates (K_S)'],
|
21
|
+
[DataType::Mpint, :'f'],
|
22
|
+
[DataType::String, :'signature of H'],
|
23
23
|
]
|
24
24
|
end
|
25
25
|
end
|
@@ -16,10 +16,10 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::Uint32, 'min'],
|
21
|
-
[DataType::Uint32, 'n'],
|
22
|
-
[DataType::Uint32, 'max'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::Uint32, :'min'],
|
21
|
+
[DataType::Uint32, :'n'],
|
22
|
+
[DataType::Uint32, :'max'],
|
23
23
|
]
|
24
24
|
end
|
25
25
|
end
|
@@ -16,40 +16,40 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::String, 'user name'],
|
21
|
-
[DataType::String, 'service name'],
|
22
|
-
[DataType::String, 'method name'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'user name'],
|
21
|
+
[DataType::String, :'service name'],
|
22
|
+
[DataType::String, :'method name'],
|
23
23
|
]
|
24
24
|
|
25
25
|
PUBLICKEY_DEFINITION = [
|
26
26
|
#[DataType, Field Name]
|
27
|
-
#[DataType::String, 'method name' : "publickey"],
|
28
|
-
[DataType::Boolean, 'with signature'],
|
29
|
-
[DataType::String, 'public key algorithm name'],
|
30
|
-
[DataType::String, 'public key blob'],
|
27
|
+
#[DataType::String, :'method name' : "publickey"],
|
28
|
+
[DataType::Boolean, :'with signature'],
|
29
|
+
[DataType::String, :'public key algorithm name'],
|
30
|
+
[DataType::String, :'public key blob'],
|
31
31
|
]
|
32
32
|
|
33
33
|
PUBLICKEY_SIGNATURE_DEFINITION = [
|
34
34
|
#[DataType, Field Name]
|
35
|
-
#[DataType::String, 'with signature' : "TRUE"],
|
36
|
-
[DataType::String, 'signature'],
|
35
|
+
#[DataType::String, :'with signature' : "TRUE"],
|
36
|
+
[DataType::String, :'signature'],
|
37
37
|
]
|
38
38
|
|
39
39
|
PASSWORD_DEFINITION = [
|
40
40
|
#[DataType, Field Name]
|
41
|
-
#[DataType::String, 'method name' : "password"],
|
42
|
-
[DataType::Boolean, 'FALSE'],
|
43
|
-
[DataType::String, 'plaintext password'],
|
41
|
+
#[DataType::String, :'method name' : "password"],
|
42
|
+
[DataType::Boolean, :'FALSE'],
|
43
|
+
[DataType::String, :'plaintext password'],
|
44
44
|
]
|
45
45
|
|
46
46
|
CONDITIONAL_DEFINITION = {
|
47
47
|
# Field Name => {Field Value => Conditional Definition}
|
48
|
-
'method name' => {
|
49
|
-
|
50
|
-
|
48
|
+
:'method name' => {
|
49
|
+
"publickey" => PUBLICKEY_DEFINITION,
|
50
|
+
"password" => PASSWORD_DEFINITION,
|
51
51
|
},
|
52
|
-
'with signature' => {
|
52
|
+
:'with signature' => {
|
53
53
|
true => PUBLICKEY_SIGNATURE_DEFINITION,
|
54
54
|
},
|
55
55
|
}
|
@@ -16,9 +16,9 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::NameList,
|
21
|
-
[DataType::Boolean, 'partial success'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::NameList, :'authentications that can continue'],
|
21
|
+
[DataType::Boolean, :'partial success'],
|
22
22
|
]
|
23
23
|
end
|
24
24
|
end
|
@@ -16,9 +16,9 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::String, 'public key algorithm name from the request'],
|
21
|
-
[DataType::String, 'public key blob from the request'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'public key algorithm name from the request'],
|
21
|
+
[DataType::String, :'public key blob from the request'],
|
22
22
|
]
|
23
23
|
end
|
24
24
|
end
|
@@ -16,30 +16,30 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::String, 'request name'],
|
21
|
-
[DataType::Boolean, 'want reply'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'request name'],
|
21
|
+
[DataType::Boolean, :'want reply'],
|
22
22
|
]
|
23
23
|
|
24
24
|
TCPIP_FORWARD_DEFINITION = [
|
25
25
|
#[DataType, Field Name]
|
26
|
-
#[DataType::String, 'request name' : "tcpip-forward"],
|
27
|
-
[DataType::String, 'address to bind'],
|
28
|
-
[DataType::Uint32, 'port number to bind'],
|
26
|
+
#[DataType::String, :'request name' : "tcpip-forward"],
|
27
|
+
[DataType::String, :'address to bind'],
|
28
|
+
[DataType::Uint32, :'port number to bind'],
|
29
29
|
]
|
30
30
|
|
31
31
|
CANCEL_TCPIP_FORWARD_DEFINITION = [
|
32
32
|
#[DataType, Field Name]
|
33
|
-
#[DataType::String, 'request name' : "cancel-tcpip-forward"],
|
34
|
-
[DataType::String, 'address to bind'],
|
35
|
-
[DataType::Uint32, 'port number to bind'],
|
33
|
+
#[DataType::String, :'request name' : "cancel-tcpip-forward"],
|
34
|
+
[DataType::String, :'address to bind'],
|
35
|
+
[DataType::Uint32, :'port number to bind'],
|
36
36
|
]
|
37
37
|
|
38
38
|
CONDITIONAL_DEFINITION = {
|
39
39
|
# Field Name => {Field Value => Conditional Definition}
|
40
|
-
'request name' => {
|
41
|
-
|
42
|
-
|
40
|
+
:'request name' => {
|
41
|
+
"tcpip-forward" => TCPIP_FORWARD_DEFINITION,
|
42
|
+
"cancel-tcpip-forward" => CANCEL_TCPIP_FORWARD_DEFINITION,
|
43
43
|
},
|
44
44
|
}
|
45
45
|
end
|
@@ -16,19 +16,19 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
20
|
]
|
21
21
|
|
22
22
|
TCPIP_FORWARD_DEFINITION = [
|
23
23
|
#[DataType, Field Name]
|
24
|
-
#[DataType::String, 'request name' : "tcpip-forward"],
|
25
|
-
[DataType::Uint32, 'port that was bound on the server'],
|
24
|
+
#[DataType::String, :'request name' : "tcpip-forward"],
|
25
|
+
[DataType::Uint32, :'port that was bound on the server'],
|
26
26
|
]
|
27
27
|
|
28
28
|
CONDITIONAL_DEFINITION = {
|
29
29
|
# Field Name => {Field Value => Conditional Definition}
|
30
|
-
'request name' => {
|
31
|
-
|
30
|
+
:'request name' => {
|
31
|
+
"tcpip-forward" => TCPIP_FORWARD_DEFINITION,
|
32
32
|
}
|
33
33
|
}
|
34
34
|
end
|
@@ -16,50 +16,50 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::String, 'channel type'],
|
21
|
-
[DataType::Uint32, 'sender channel'],
|
22
|
-
[DataType::Uint32, 'initial window size'],
|
23
|
-
[DataType::Uint32, 'maximum packet size'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::String, :'channel type'],
|
21
|
+
[DataType::Uint32, :'sender channel'],
|
22
|
+
[DataType::Uint32, :'initial window size'],
|
23
|
+
[DataType::Uint32, :'maximum packet size'],
|
24
24
|
]
|
25
25
|
|
26
26
|
SESSION_DEFINITION = [
|
27
27
|
#[DataType, Field Name]
|
28
|
-
#[DataType::String, 'channel type' : "session"],
|
28
|
+
#[DataType::String, :'channel type' : "session"],
|
29
29
|
]
|
30
30
|
|
31
31
|
X11_DEFINITION = [
|
32
32
|
#[DataType, Field Name]
|
33
|
-
#[DataType::String, 'channel type' : "x11"],
|
34
|
-
[DataType::String, 'originator address'],
|
35
|
-
[DataType::Uint32, 'originator port'],
|
33
|
+
#[DataType::String, :'channel type' : "x11"],
|
34
|
+
[DataType::String, :'originator address'],
|
35
|
+
[DataType::Uint32, :'originator port'],
|
36
36
|
]
|
37
37
|
|
38
38
|
FORWARDED_TCPIP_DEFINITION = [
|
39
39
|
#[DataType, Field Name]
|
40
|
-
#[DataType::String, 'channel type' : "forwarded-tcpip"],
|
41
|
-
[DataType::String, 'address that was connected'],
|
42
|
-
[DataType::Uint32, 'port that was connected'],
|
43
|
-
[DataType::String, 'originator IP address'],
|
44
|
-
[DataType::Uint32, 'originator port'],
|
40
|
+
#[DataType::String, :'channel type' : "forwarded-tcpip"],
|
41
|
+
[DataType::String, :'address that was connected'],
|
42
|
+
[DataType::Uint32, :'port that was connected'],
|
43
|
+
[DataType::String, :'originator IP address'],
|
44
|
+
[DataType::Uint32, :'originator port'],
|
45
45
|
]
|
46
46
|
|
47
47
|
DIRECT_TCPIP_DEFINITION = [
|
48
48
|
#[DataType, Field Name]
|
49
|
-
#[DataType::String, 'channel type' : "direct-tcpip"],
|
50
|
-
[DataType::String, 'host to connect'],
|
51
|
-
[DataType::Uint32, 'port to connect'],
|
52
|
-
[DataType::String, 'originator IP address'],
|
53
|
-
[DataType::Uint32, 'originator port'],
|
49
|
+
#[DataType::String, :'channel type' : "direct-tcpip"],
|
50
|
+
[DataType::String, :'host to connect'],
|
51
|
+
[DataType::Uint32, :'port to connect'],
|
52
|
+
[DataType::String, :'originator IP address'],
|
53
|
+
[DataType::Uint32, :'originator port'],
|
54
54
|
]
|
55
55
|
|
56
56
|
CONDITIONAL_DEFINITION = {
|
57
57
|
# Field Name => {Field Value => Conditional Definition}
|
58
|
-
'channel type' => {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
:'channel type' => {
|
59
|
+
"session" => SESSION_DEFINITION,
|
60
|
+
"x11" => X11_DEFINITION,
|
61
|
+
"forwarded-tcpip" => FORWARDED_TCPIP_DEFINITION,
|
62
|
+
"direct-tcpip" => DIRECT_TCPIP_DEFINITION,
|
63
63
|
},
|
64
64
|
}
|
65
65
|
end
|
@@ -16,50 +16,40 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::Uint32, 'recipient channel'],
|
21
|
-
[DataType::Uint32, 'sender channel'],
|
22
|
-
[DataType::Uint32, 'initial window size'],
|
23
|
-
[DataType::Uint32, 'maximum packet size'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::Uint32, :'recipient channel'],
|
21
|
+
[DataType::Uint32, :'sender channel'],
|
22
|
+
[DataType::Uint32, :'initial window size'],
|
23
|
+
[DataType::Uint32, :'maximum packet size'],
|
24
24
|
]
|
25
25
|
|
26
26
|
SESSION_DEFINITION = [
|
27
27
|
#[DataType, Field Name]
|
28
|
-
#[DataType::String, 'channel type' : "session"],
|
28
|
+
#[DataType::String, :'channel type' : "session"],
|
29
29
|
]
|
30
30
|
|
31
31
|
X11_DEFINITION = [
|
32
32
|
#[DataType, Field Name]
|
33
|
-
#[DataType::String, 'channel type' : "x11"],
|
34
|
-
[DataType::String, 'originator address'],
|
35
|
-
[DataType::Uint32, 'originator port'],
|
33
|
+
#[DataType::String, :'channel type' : "x11"],
|
36
34
|
]
|
37
35
|
|
38
36
|
FORWARDED_TCPIP_DEFINITION = [
|
39
37
|
#[DataType, Field Name]
|
40
|
-
#[DataType::String, 'channel type' : "forwarded-tcpip"],
|
41
|
-
[DataType::String, 'address that was connected'],
|
42
|
-
[DataType::Uint32, 'port that was connected'],
|
43
|
-
[DataType::String, 'originator IP address'],
|
44
|
-
[DataType::Uint32, 'originator port'],
|
38
|
+
#[DataType::String, :'channel type' : "forwarded-tcpip"],
|
45
39
|
]
|
46
40
|
|
47
41
|
DIRECT_TCPIP_DEFINITION = [
|
48
42
|
#[DataType, Field Name]
|
49
|
-
#[DataType::String, 'channel type' : "direct-tcpip"],
|
50
|
-
[DataType::String, 'host to connect'],
|
51
|
-
[DataType::Uint32, 'port to connect'],
|
52
|
-
[DataType::String, 'originator IP address'],
|
53
|
-
[DataType::Uint32, 'originator port'],
|
43
|
+
#[DataType::String, :'channel type' : "direct-tcpip"],
|
54
44
|
]
|
55
45
|
|
56
46
|
CONDITIONAL_DEFINITION = {
|
57
47
|
# Field Name => {Field Value => Conditional Definition}
|
58
|
-
'channel type' => {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
48
|
+
:'channel type' => {
|
49
|
+
"session" => SESSION_DEFINITION,
|
50
|
+
"x11" => X11_DEFINITION,
|
51
|
+
"forwarded-tcpip" => FORWARDED_TCPIP_DEFINITION,
|
52
|
+
"direct-tcpip" => DIRECT_TCPIP_DEFINITION,
|
63
53
|
},
|
64
54
|
}
|
65
55
|
end
|
@@ -23,11 +23,11 @@ module HrrRbSsh
|
|
23
23
|
|
24
24
|
DEFINITION = [
|
25
25
|
#[DataType, Field Name]
|
26
|
-
[DataType::Byte, 'message number'],
|
27
|
-
[DataType::Uint32, 'recipient channel'],
|
28
|
-
[DataType::Uint32, 'reason code'],
|
29
|
-
[DataType::String, 'description'],
|
30
|
-
[DataType::String, 'language tag'],
|
26
|
+
[DataType::Byte, :'message number'],
|
27
|
+
[DataType::Uint32, :'recipient channel'],
|
28
|
+
[DataType::Uint32, :'reason code'],
|
29
|
+
[DataType::String, :'description'],
|
30
|
+
[DataType::String, :'language tag'],
|
31
31
|
]
|
32
32
|
end
|
33
33
|
end
|
@@ -16,9 +16,9 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::Uint32, 'recipient channel'],
|
21
|
-
[DataType::Uint32, 'bytes to add'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::Uint32, :'recipient channel'],
|
21
|
+
[DataType::Uint32, :'bytes to add'],
|
22
22
|
]
|
23
23
|
end
|
24
24
|
end
|
@@ -16,9 +16,9 @@ module HrrRbSsh
|
|
16
16
|
|
17
17
|
DEFINITION = [
|
18
18
|
#[DataType, Field Name]
|
19
|
-
[DataType::Byte, 'message number'],
|
20
|
-
[DataType::Uint32, 'recipient channel'],
|
21
|
-
[DataType::String, 'data'],
|
19
|
+
[DataType::Byte, :'message number'],
|
20
|
+
[DataType::Uint32, :'recipient channel'],
|
21
|
+
[DataType::String, :'data'],
|
22
22
|
]
|
23
23
|
end
|
24
24
|
end
|
@@ -20,10 +20,10 @@ module HrrRbSsh
|
|
20
20
|
|
21
21
|
DEFINITION = [
|
22
22
|
#[DataType, Field Name]
|
23
|
-
[DataType::Byte, 'message number'],
|
24
|
-
[DataType::Uint32, 'recipient channel'],
|
25
|
-
[DataType::Uint32, 'data type code'],
|
26
|
-
[DataType::String, 'data'],
|
23
|
+
[DataType::Byte, :'message number'],
|
24
|
+
[DataType::Uint32, :'recipient channel'],
|
25
|
+
[DataType::Uint32, :'data type code'],
|
26
|
+
[DataType::String, :'data'],
|
27
27
|
]
|
28
28
|
end
|
29
29
|
end
|