arachni-rpc-pure 0.1.2 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.md +1 -1
- data/README.md +19 -8
- data/Rakefile +1 -1
- data/examples/client.rb +36 -48
- data/lib/arachni/rpc/pure.rb +3 -9
- data/lib/arachni/rpc/pure/client.rb +59 -30
- data/lib/arachni/rpc/pure/connection.rb +70 -26
- data/lib/arachni/rpc/pure/version.rb +4 -2
- metadata +44 -66
- data/spec/arachni/rpc/pure/client_spec.rb +0 -119
- data/spec/pems/cacert.pem +0 -37
- data/spec/pems/client/cert.pem +0 -37
- data/spec/pems/client/foo-cert.pem +0 -39
- data/spec/pems/client/foo-key.pem +0 -51
- data/spec/pems/client/key.pem +0 -51
- data/spec/spec.opts +0 -2
- data/spec/spec_helper.rb +0 -42
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 12c56321178ecdc10170f910b5c2e2f78d473caa
|
4
|
+
data.tar.gz: 54380412a7a078f9ea47d0e48933e54b1b85a950
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 11facfba44fdab2235e65bb40ed95c49b017187d9fa4510e3c9aec6cdbf5a1d25b86c37b03a43afad8d489e8abb0273f008d43a6ce24d6d4c7b987c32c96d0a5
|
7
|
+
data.tar.gz: cef06f2269e9cef578053bc70ac52a228314e68cf48a4372456abc6ec03e7b27064582910593a3c2f50f557e58379df61806109d694f227b32fbd50be10663eb
|
data/CHANGELOG.md
CHANGED
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# Arachni-RPC Pure
|
2
|
+
|
2
3
|
<table>
|
3
4
|
<tr>
|
4
5
|
<th>Version</th>
|
5
|
-
<td>0.
|
6
|
+
<td>0.2</td>
|
6
7
|
</tr>
|
7
8
|
<tr>
|
8
9
|
<th>Github page</th>
|
@@ -14,7 +15,7 @@
|
|
14
15
|
</tr>
|
15
16
|
<tr>
|
16
17
|
<th>Author</th>
|
17
|
-
<td><a href="mailto:tasos.laskos@
|
18
|
+
<td><a href="mailto:tasos.laskos@arachni-scanner.com">Tasos Laskos</a></td>
|
18
19
|
</tr>
|
19
20
|
<tr>
|
20
21
|
<th>Twitter</th>
|
@@ -22,7 +23,7 @@
|
|
22
23
|
</tr>
|
23
24
|
<tr>
|
24
25
|
<th>Copyright</th>
|
25
|
-
<td>2011</td>
|
26
|
+
<td>2011-2014</td>
|
26
27
|
</tr>
|
27
28
|
<tr>
|
28
29
|
<th>License</th>
|
@@ -32,12 +33,18 @@
|
|
32
33
|
|
33
34
|
## Synopsis
|
34
35
|
|
35
|
-
Arachni-RPC Pure is a simple implementation of a client for the
|
36
|
-
|
36
|
+
Arachni-RPC Pure is a simple implementation of a client for the
|
37
|
+
[Arachni-RPC](http://github.com/Arachni/arachni-rpc) protocol and comes
|
38
|
+
pre-configured with a suitable serializer (MessagePack basically) for
|
39
|
+
communicating with [Arachni](http://github.com/Arachni/arachni)'s services.
|
40
|
+
|
41
|
+
It is, in essence, a very simple, reference implementation for people who want
|
42
|
+
to write their own clients in order to communicate with
|
43
|
+
[Arachni](http://github.com/Arachni/arachni).
|
37
44
|
|
38
45
|
## Usage
|
39
46
|
|
40
|
-
|
47
|
+
Usages examples are in the `examples/` directory.
|
41
48
|
|
42
49
|
## Installation
|
43
50
|
|
@@ -55,7 +62,9 @@ If you want to clone the repository and work with the source code:
|
|
55
62
|
|
56
63
|
## Running the Specs
|
57
64
|
|
58
|
-
In order to run the specs you must first fire up 2 sample servers although they
|
65
|
+
In order to run the specs you must first fire up 2 sample servers although they
|
66
|
+
are not part of this project -- as it is only a client implementation.
|
67
|
+
|
59
68
|
You can find the required servers in the [Arachni-RPC EM](https://github.com/Arachni/arachni-rpc-em) project.
|
60
69
|
|
61
70
|
From inside the Arachni-RPC EM directory run:
|
@@ -73,6 +82,8 @@ Please send your feedback using Github's issue system at
|
|
73
82
|
|
74
83
|
|
75
84
|
## License
|
76
|
-
|
85
|
+
|
86
|
+
Arachni-RPC Pure is provided under the 3-clause BSD license.
|
87
|
+
|
77
88
|
See the [LICENSE](file.LICENSE.html) file for more information.
|
78
89
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
|
3
3
|
This file is part of the Arachni-RPC Pure project and may be subject to
|
4
|
-
redistribution and commercial restrictions. Please see the Arachni-RPC
|
4
|
+
redistribution and commercial restrictions. Please see the Arachni-RPC Pure
|
5
5
|
web site for more information on licensing and terms of use.
|
6
6
|
|
7
7
|
=end
|
data/examples/client.rb
CHANGED
@@ -1,63 +1,51 @@
|
|
1
|
-
|
1
|
+
require_relative '../lib/arachni/rpc/pure'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
dispatcher = Arachni::RPC::Pure::Client.new(
|
4
|
+
host: '127.0.0.1',
|
5
|
+
port: 7331
|
6
|
+
)
|
5
7
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
instance_info = dispatcher.call( 'dispatcher.dispatch', 'The Dude' )
|
9
|
+
# => {
|
10
|
+
# "token" => "1ac10910f41ce86e23ab954033b40a83",
|
11
|
+
# "pid" => 27031,
|
12
|
+
# "port" => 23496,
|
13
|
+
# "url" => "127.0.0.1:23496",
|
14
|
+
# "owner" => "The Dude",
|
15
|
+
# "birthdate" => "2014-08-05 19:54:07 +0300",
|
16
|
+
# "starttime" => "2014-08-05 19:54:58 +0300",
|
17
|
+
# "helpers" => {}
|
18
|
+
# }
|
19
|
+
|
20
|
+
instance = Arachni::RPC::Pure::Client.new(
|
21
|
+
host: '127.0.0.1',
|
22
|
+
port: instance_info['port'],
|
23
|
+
token: instance_info['token']
|
11
24
|
)
|
12
25
|
|
26
|
+
p instance.call( 'service.alive?' )
|
27
|
+
# => true
|
28
|
+
|
13
29
|
begin
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
pp e
|
18
|
-
# => #<Arachni::RPC::Exceptions::InvalidObject: Trying to access non-existent object 'bench2'.>
|
30
|
+
instance.call( 'service.scan' )
|
31
|
+
rescue => e
|
32
|
+
# => #<RuntimeError: RemoteException: Option 'url' is mandatory.>
|
19
33
|
end
|
20
34
|
|
21
|
-
# This is just an echo method so it will return: 1
|
22
|
-
pp client.call( 'bench.foo', 1 )
|
23
|
-
# => 1
|
24
|
-
|
25
|
-
# make access more natural, map (proxy actually) the remote object to a local one
|
26
|
-
bench = Arachni::RPC::RemoteObjectMapper.new( client, 'bench' )
|
27
|
-
|
28
|
-
pp bench.foo( 2 )
|
29
|
-
# => 2
|
30
|
-
|
31
35
|
begin
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
bench.does_not_exist
|
36
|
-
rescue Arachni::RPC::Exceptions::InvalidMethod => e
|
37
|
-
pp e
|
38
|
-
# => #<Arachni::RPC::Exceptions::InvalidMethod: Trying to access non-public method 'does_not_exist'.>
|
36
|
+
instance.call( 'service.error_test' )
|
37
|
+
rescue => e
|
38
|
+
# => #<RuntimeError: RemoteException: wrong number of arguments (0 for 1)>
|
39
39
|
end
|
40
40
|
|
41
41
|
begin
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
rescue Arachni::RPC::Exceptions::RemoteException => e
|
46
|
-
pp e
|
47
|
-
# => #<Arachni::RPC::Exceptions::RemoteException: wrong number of arguments (0 for 1)>
|
42
|
+
instance.call( 'service.blahblah' )
|
43
|
+
rescue => e
|
44
|
+
# => #<RuntimeError: InvalidMethod: Trying to access non-public method 'blahblah'.>
|
48
45
|
end
|
49
46
|
|
50
|
-
client = Arachni::RPC::Pure::Client.new(
|
51
|
-
:host => 'localhost',
|
52
|
-
:port => 7332,
|
53
|
-
:token => 'invalidtoken',
|
54
|
-
:serializer => Marshal
|
55
|
-
)
|
56
|
-
|
57
47
|
begin
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
pp e
|
62
|
-
# => #<Arachni::RPC::Exceptions::InvalidToken: Token missing or invalid while calling: bench.foo>
|
48
|
+
instance.call( 'blahblah.stuff' )
|
49
|
+
rescue => e
|
50
|
+
# => #<RuntimeError: InvalidObject: Trying to access non-existent object 'blahblah'.>
|
63
51
|
end
|
data/lib/arachni/rpc/pure.rb
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
=begin
|
2
2
|
|
3
3
|
This file is part of the Arachni-RPC Pure project and may be subject to
|
4
|
-
redistribution and commercial restrictions. Please see the Arachni-RPC
|
4
|
+
redistribution and commercial restrictions. Please see the Arachni-RPC Pure
|
5
5
|
web site for more information on licensing and terms of use.
|
6
6
|
|
7
7
|
=end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
require 'yaml'
|
12
|
-
YAML::ENGINE.yamler = 'syck'
|
13
|
-
|
14
|
-
require 'arachni/rpc'
|
15
|
-
require File.join( File.expand_path( File.dirname( __FILE__ ) ), 'pure', 'connection' )
|
16
|
-
require File.join( File.expand_path( File.dirname( __FILE__ ) ), 'pure', 'client' )
|
9
|
+
require_relative 'pure/connection'
|
10
|
+
require_relative 'pure/client'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
|
3
3
|
This file is part of the Arachni-RPC Pure project and may be subject to
|
4
|
-
redistribution and commercial restrictions. Please see the Arachni-RPC
|
4
|
+
redistribution and commercial restrictions. Please see the Arachni-RPC Pure
|
5
5
|
web site for more information on licensing and terms of use.
|
6
6
|
|
7
7
|
=end
|
@@ -10,51 +10,80 @@ module Arachni
|
|
10
10
|
module RPC
|
11
11
|
module Pure
|
12
12
|
|
13
|
+
# Very simple client, essentially establishes a {Connection} and performs
|
14
|
+
# requests.
|
15
|
+
#
|
16
|
+
# @author Tasos Laskos <tasos.laskos@arachni-scanner.com>
|
13
17
|
class Client
|
14
18
|
|
15
|
-
|
16
|
-
|
19
|
+
# @param [Hash] options
|
20
|
+
# @option options [String] :host
|
21
|
+
# Hostname/IP address.
|
22
|
+
# @option options [Integer] :port
|
23
|
+
# Port number.
|
24
|
+
# @option options [String] :token
|
25
|
+
# Optional authentication token.
|
26
|
+
# @option options [String] :ssl_ca
|
27
|
+
# SSL CA certificate.
|
28
|
+
# @option options [String] :ssl_pkey
|
29
|
+
# SSL private key.
|
30
|
+
# @option options [String] :ssl_cert
|
31
|
+
# SSL certificate.
|
32
|
+
def initialize( options )
|
33
|
+
@options = options
|
17
34
|
end
|
18
35
|
|
36
|
+
# @note Will establish a connection if none is available.
|
37
|
+
#
|
38
|
+
# Performs an RPC request and returns a response.
|
39
|
+
#
|
40
|
+
# @param [String] msg
|
41
|
+
# RPC message in the form of `handler.method`.
|
42
|
+
# @param [Array] args
|
43
|
+
# Collection of arguments to be passed to the method.
|
44
|
+
#
|
45
|
+
# @return [Object]
|
46
|
+
# Response object.
|
47
|
+
#
|
48
|
+
# @raise [RuntimeError]
|
49
|
+
# * If a connection error was encountered the relevant exception will be
|
50
|
+
# raised.
|
51
|
+
# * If the response object is a remote exception, one will also be raised
|
52
|
+
# locally.
|
19
53
|
def call( msg, *args )
|
20
|
-
|
21
|
-
begin
|
22
|
-
conn = Connection.new( @opts )
|
23
|
-
rescue OpenSSL::SSL::SSLError => ex
|
24
|
-
e = Arachni::RPC::Exceptions::SSLPeerVerificationFailed.new( ex.to_s )
|
25
|
-
e.set_backtrace( ex.backtrace )
|
26
|
-
raise e
|
27
|
-
rescue Errno::ECONNREFUSED => ex
|
28
|
-
e = Arachni::RPC::Exceptions::ConnectionError.new( ex.to_s )
|
29
|
-
e.set_backtrace( ex.backtrace )
|
30
|
-
raise e
|
31
|
-
end
|
32
|
-
|
33
|
-
response = conn.perform( request( msg, *args ) )
|
34
|
-
conn.close
|
35
|
-
|
54
|
+
response = with_connection { |c| c.perform( request( msg, *args ) ) }
|
36
55
|
handle_exception( response )
|
37
|
-
|
56
|
+
|
57
|
+
response['obj']
|
38
58
|
end
|
39
59
|
|
40
60
|
private
|
41
61
|
|
42
|
-
def
|
43
|
-
|
44
|
-
|
62
|
+
def with_connection( &block )
|
63
|
+
c = Connection.new( @options )
|
64
|
+
|
65
|
+
begin
|
66
|
+
block.call c
|
67
|
+
ensure
|
68
|
+
c.close
|
45
69
|
end
|
46
70
|
end
|
47
71
|
|
48
|
-
def
|
49
|
-
|
72
|
+
def handle_exception( response )
|
73
|
+
return if !(data = response['exception'])
|
74
|
+
|
75
|
+
exception = RuntimeError.new( "#{data['type']}: #{data['message']}" )
|
76
|
+
exception.set_backtrace( data['backtrace'] )
|
77
|
+
|
78
|
+
raise exception
|
50
79
|
end
|
51
80
|
|
52
81
|
def request( msg, *args )
|
53
|
-
|
54
|
-
:
|
55
|
-
:args
|
56
|
-
:
|
57
|
-
|
82
|
+
{
|
83
|
+
message: msg,
|
84
|
+
args: args,
|
85
|
+
token: @options[:token]
|
86
|
+
}
|
58
87
|
end
|
59
88
|
|
60
89
|
end
|
@@ -1,46 +1,71 @@
|
|
1
1
|
=begin
|
2
2
|
|
3
3
|
This file is part of the Arachni-RPC Pure project and may be subject to
|
4
|
-
redistribution and commercial restrictions. Please see the Arachni-RPC
|
4
|
+
redistribution and commercial restrictions. Please see the Arachni-RPC Pure
|
5
5
|
web site for more information on licensing and terms of use.
|
6
6
|
|
7
7
|
=end
|
8
8
|
|
9
|
+
require 'openssl'
|
10
|
+
require 'socket'
|
11
|
+
require 'zlib'
|
12
|
+
require 'msgpack'
|
13
|
+
|
9
14
|
module Arachni
|
10
15
|
module RPC
|
11
16
|
module Pure
|
12
17
|
|
18
|
+
# Represents an RPC connection, which is basically an OpenSSL socket with
|
19
|
+
# the ability to serialize/unserialize RPC messages.
|
20
|
+
#
|
21
|
+
# @author Tasos Laskos <tasos.laskos@arachni-scanner.com>
|
13
22
|
class Connection
|
14
23
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
# @param [Hash] options
|
25
|
+
# @option options [String] :host
|
26
|
+
# Hostname/IP address.
|
27
|
+
# @option options [Integer] :port
|
28
|
+
# Port number.
|
29
|
+
# @option options [String] :ssl_ca
|
30
|
+
# SSL CA certificate.
|
31
|
+
# @option options [String] :ssl_pkey
|
32
|
+
# SSL private key.
|
33
|
+
# @option options [String] :ssl_cert
|
34
|
+
# SSL certificate.
|
35
|
+
def initialize( options )
|
36
|
+
context = OpenSSL::SSL::SSLContext.new
|
37
|
+
|
38
|
+
if options[:ssl_cert] && options[:ssl_pkey]
|
39
|
+
context.cert =
|
40
|
+
OpenSSL::X509::Certificate.new( File.open( options[:ssl_cert] ) )
|
41
|
+
|
42
|
+
context.key =
|
43
|
+
OpenSSL::PKey::RSA.new( File.open( options[:ssl_pkey] ) )
|
44
|
+
|
45
|
+
context.ca_file = options[:ssl_ca]
|
46
|
+
context.verify_mode =
|
27
47
|
OpenSSL::SSL::VERIFY_PEER | OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
|
28
48
|
end
|
29
49
|
|
30
|
-
@
|
31
|
-
|
32
|
-
|
50
|
+
@socket = OpenSSL::SSL::SSLSocket.new(
|
51
|
+
TCPSocket.new( options[:host], options[:port] ),
|
52
|
+
context
|
53
|
+
)
|
54
|
+
@socket.sync_close = true
|
55
|
+
@socket.connect
|
33
56
|
end
|
34
57
|
|
58
|
+
# Closes the connection.
|
35
59
|
def close
|
36
|
-
@
|
60
|
+
@socket.close
|
37
61
|
end
|
38
62
|
|
63
|
+
# @param [Hash] request
|
64
|
+
# RPC request message data.
|
39
65
|
def perform( request )
|
40
|
-
|
66
|
+
send_rcv_object( request )
|
41
67
|
end
|
42
68
|
|
43
|
-
|
44
69
|
private
|
45
70
|
|
46
71
|
def send_rcv_object( obj )
|
@@ -49,12 +74,12 @@ class Connection
|
|
49
74
|
end
|
50
75
|
|
51
76
|
def send_object( obj )
|
52
|
-
serialized =
|
53
|
-
@
|
77
|
+
serialized = serialize( obj )
|
78
|
+
@socket.puts( [ serialized.bytesize, serialized ].pack( 'Na*' ) )
|
54
79
|
end
|
55
80
|
|
56
81
|
def receive_object
|
57
|
-
while data = @
|
82
|
+
while data = @socket.sysread( 99999 )
|
58
83
|
(@buf ||= '') << data
|
59
84
|
while @buf.size >= 4
|
60
85
|
if @buf.size >= 4 + ( size = @buf.unpack( 'N' ).first )
|
@@ -62,7 +87,7 @@ class Connection
|
|
62
87
|
|
63
88
|
complete = @buf.slice!( 0, size )
|
64
89
|
@buf = ''
|
65
|
-
return
|
90
|
+
return unserialize( complete )
|
66
91
|
else
|
67
92
|
break
|
68
93
|
end
|
@@ -70,12 +95,31 @@ class Connection
|
|
70
95
|
end
|
71
96
|
end
|
72
97
|
|
73
|
-
|
98
|
+
def serialize( object )
|
99
|
+
MessagePack.dump object
|
100
|
+
end
|
74
101
|
|
75
|
-
def
|
76
|
-
|
102
|
+
def unserialize( object )
|
103
|
+
MessagePack.load try_decompress( object )
|
77
104
|
end
|
78
105
|
|
106
|
+
# @note Will return the `string` as is if it was not compressed.
|
107
|
+
#
|
108
|
+
# @param [String] string
|
109
|
+
# String to decompress.
|
110
|
+
#
|
111
|
+
# @return [String]
|
112
|
+
# Decompressed string.
|
113
|
+
def try_decompress( string )
|
114
|
+
# Just an ID representing a serialized, empty data structure.
|
115
|
+
return string if string.size == 1
|
116
|
+
|
117
|
+
begin
|
118
|
+
Zlib::Inflate.inflate string
|
119
|
+
rescue Zlib::DataError
|
120
|
+
string
|
121
|
+
end
|
122
|
+
end
|
79
123
|
|
80
124
|
end
|
81
125
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
|
3
3
|
This file is part of the Arachni-RPC Pure project and may be subject to
|
4
|
-
redistribution and commercial restrictions. Please see the Arachni-RPC
|
4
|
+
redistribution and commercial restrictions. Please see the Arachni-RPC Pure
|
5
5
|
web site for more information on licensing and terms of use.
|
6
6
|
|
7
7
|
=end
|
@@ -9,7 +9,9 @@
|
|
9
9
|
module Arachni
|
10
10
|
module RPC
|
11
11
|
module Pure
|
12
|
-
|
12
|
+
|
13
|
+
VERSION = '0.2'
|
14
|
+
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
metadata
CHANGED
@@ -1,92 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: arachni-rpc-pure
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: "0.2"
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Tasos Laskos
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-02-11 00:00:00.000000000 Z
|
13
|
-
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: arachni-rpc
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - '='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 0.1.3
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - '='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.1.3
|
30
|
-
description: ! ' Pure Ruby client implementation of the Arachni-RPC protocol.
|
31
11
|
|
32
|
-
|
33
|
-
|
12
|
+
date: 2014-08-29 00:00:00 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: msgpack
|
16
|
+
prerelease: false
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- &id002
|
20
|
+
- ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
23
|
+
type: :runtime
|
24
|
+
version_requirements: *id001
|
25
|
+
description: " Pure Ruby client implementation of the Arachni-RPC protocol.\n"
|
26
|
+
email: tasos.laskos@arachni-scanner.com
|
34
27
|
executables: []
|
28
|
+
|
35
29
|
extensions: []
|
36
|
-
|
30
|
+
|
31
|
+
extra_rdoc_files:
|
37
32
|
- README.md
|
38
33
|
- LICENSE.md
|
39
34
|
- CHANGELOG.md
|
40
|
-
files:
|
35
|
+
files:
|
36
|
+
- CHANGELOG.md
|
37
|
+
- LICENSE.md
|
41
38
|
- README.md
|
42
39
|
- Rakefile
|
43
|
-
-
|
44
|
-
-
|
45
|
-
- lib/arachni/rpc/pure/version.rb
|
40
|
+
- examples/client.rb
|
41
|
+
- lib/arachni/rpc/pure.rb
|
46
42
|
- lib/arachni/rpc/pure/client.rb
|
47
43
|
- lib/arachni/rpc/pure/connection.rb
|
48
|
-
- lib/arachni/rpc/pure.rb
|
49
|
-
- examples/client.rb
|
50
|
-
- spec/pems/cacert.pem
|
51
|
-
- spec/pems/client/foo-cert.pem
|
52
|
-
- spec/pems/client/foo-key.pem
|
53
|
-
- spec/pems/client/key.pem
|
54
|
-
- spec/pems/client/cert.pem
|
55
|
-
- spec/arachni/rpc/pure/client_spec.rb
|
56
|
-
- spec/spec.opts
|
57
|
-
- spec/spec_helper.rb
|
44
|
+
- lib/arachni/rpc/pure/version.rb
|
58
45
|
homepage: https://github.com/Arachni/arachni-rpc-pure
|
59
46
|
licenses: []
|
47
|
+
|
48
|
+
metadata: {}
|
49
|
+
|
60
50
|
post_install_message:
|
61
|
-
rdoc_options:
|
51
|
+
rdoc_options:
|
62
52
|
- --charset=UTF-8
|
63
|
-
require_paths:
|
53
|
+
require_paths:
|
64
54
|
- lib
|
65
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ! '>='
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '0'
|
55
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- *id002
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- *id002
|
77
61
|
requirements: []
|
62
|
+
|
78
63
|
rubyforge_project:
|
79
|
-
rubygems_version:
|
64
|
+
rubygems_version: 2.2.2
|
80
65
|
signing_key:
|
81
|
-
specification_version:
|
66
|
+
specification_version: 4
|
82
67
|
summary: Pure Ruby client for Arachni-RPC.
|
83
|
-
test_files:
|
68
|
+
test_files:
|
84
69
|
- examples/client.rb
|
85
|
-
|
86
|
-
- spec/pems/client/foo-cert.pem
|
87
|
-
- spec/pems/client/foo-key.pem
|
88
|
-
- spec/pems/client/key.pem
|
89
|
-
- spec/pems/client/cert.pem
|
90
|
-
- spec/arachni/rpc/pure/client_spec.rb
|
91
|
-
- spec/spec.opts
|
92
|
-
- spec/spec_helper.rb
|
70
|
+
has_rdoc:
|
@@ -1,119 +0,0 @@
|
|
1
|
-
require File.join( File.expand_path( File.dirname( __FILE__ ) ), '../../../', 'spec_helper' )
|
2
|
-
|
3
|
-
describe Arachni::RPC::Pure::Client do
|
4
|
-
|
5
|
-
before( :all ) do
|
6
|
-
@arg = [
|
7
|
-
'one',
|
8
|
-
2,
|
9
|
-
{ :three => 3 },
|
10
|
-
[ 4 ]
|
11
|
-
]
|
12
|
-
end
|
13
|
-
|
14
|
-
describe "raw interface" do
|
15
|
-
|
16
|
-
it "should be able to perform calls" do
|
17
|
-
@arg.should == start_client( rpc_opts ).call( 'test.foo', @arg )
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
describe "Arachni::RPC::RemoteObjectMapper interface" do
|
23
|
-
|
24
|
-
it "should be able to properly forward calls" do
|
25
|
-
test = Arachni::RPC::RemoteObjectMapper.new( start_client( rpc_opts ), 'test' )
|
26
|
-
test.foo( @arg ).should == @arg
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "exception" do
|
32
|
-
|
33
|
-
it "should be raised when requesting inexistent objects" do
|
34
|
-
begin
|
35
|
-
start_client( rpc_opts ).call( 'bar2.foo' )
|
36
|
-
rescue Exception => e
|
37
|
-
e.rpc_invalid_object_error?.should be_true
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
it "should be raised when requesting inexistent or non-public methods" do
|
42
|
-
begin
|
43
|
-
start_client( rpc_opts ).call( 'test.bar2' )
|
44
|
-
rescue Exception => e
|
45
|
-
e.rpc_invalid_method_error?.should be_true
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
it "should be raised when there's a remote exception" do
|
51
|
-
begin
|
52
|
-
start_client( rpc_opts ).call( 'test.foo' )
|
53
|
-
rescue Exception => e
|
54
|
-
e.rpc_remote_exception?.should be_true
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
it "should be able to retain stability and consistency under heavy load" do
|
61
|
-
client = start_client( rpc_opts )
|
62
|
-
|
63
|
-
n = 1000
|
64
|
-
cnt = 0
|
65
|
-
|
66
|
-
mismatches = []
|
67
|
-
|
68
|
-
n.times {
|
69
|
-
|i|
|
70
|
-
client.call( 'test.foo', i ) {
|
71
|
-
|res|
|
72
|
-
|
73
|
-
cnt += 1
|
74
|
-
|
75
|
-
mismatches << [i, res] if i != res
|
76
|
-
break if cnt == n || !mismatches.empty?
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
mismatches.should be_empty
|
81
|
-
end
|
82
|
-
|
83
|
-
it "should throw error when connecting to inexistent server" do
|
84
|
-
begin
|
85
|
-
start_client( rpc_opts.merge( :port => 9999 ) ).call( 'test.foo', @arg )
|
86
|
-
rescue Exception => e
|
87
|
-
e.rpc_connection_error?.should be_true
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
context "when using valid SSL primitives" do
|
92
|
-
it "should be able to establish a connection" do
|
93
|
-
res = start_client( rpc_opts_with_ssl_primitives ).call( 'test.foo', @arg )
|
94
|
-
res.should == @arg
|
95
|
-
end
|
96
|
-
end
|
97
|
-
|
98
|
-
context "when using invalid SSL primitives" do
|
99
|
-
it "should not be able to establish a connection" do
|
100
|
-
begin
|
101
|
-
start_client( rpc_opts_with_invalid_ssl_primitives ).call( 'test.foo', @arg )
|
102
|
-
rescue Exception => e
|
103
|
-
e.rpc_connection_error?.should be_true
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
context "when using mixed SSL primitives" do
|
109
|
-
it "should not be able to establish a connection" do
|
110
|
-
begin
|
111
|
-
start_client( rpc_opts_with_mixed_ssl_primitives ).call( 'test.foo', @arg )
|
112
|
-
rescue Exception => e
|
113
|
-
e.rpc_connection_error?.should be_true
|
114
|
-
e.rpc_ssl_error?.should be_true
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
end
|
data/spec/pems/cacert.pem
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
-----BEGIN CERTIFICATE-----
|
2
|
-
MIIGaDCCBFCgAwIBAgIJAPBYwqAog9f1MA0GCSqGSIb3DQEBBQUAMFMxCzAJBgNV
|
3
|
-
BAYTAkdSMRgwFgYDVQQDEw9BcmFjaG5pLXRlc3QtQ0ExKjAoBgkqhkiG9w0BCQEW
|
4
|
-
G2FyYWNobmlAYXJhY2huaS1zY2FubmVyLmNvbTAeFw0xMjExMDIxMDIyNTNaFw0y
|
5
|
-
MjEwMzExMDIyNTNaMFMxCzAJBgNVBAYTAkdSMRgwFgYDVQQDEw9BcmFjaG5pLXRl
|
6
|
-
c3QtQ0ExKjAoBgkqhkiG9w0BCQEWG2FyYWNobmlAYXJhY2huaS1zY2FubmVyLmNv
|
7
|
-
bTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANHbVRqyD7FT8KSCZLm1
|
8
|
-
YrOwMj78OXRjMb+ucPR+fncXR1TEuPlEFojLtzqtsaA5OJXpj+0toFP+2T4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Ilg20CJUWVJAxeLR5svyVXRSLLOQhvup9Si6iNMGYwT
|
40
|
-
p8ffAoIBACB933K6zsF6e+lQaZRB/lqutsYVZnlL8Rd8f4DsiLrcom/fvNzLd2V3
|
41
|
-
QjIF9zDRJXzbdF34LAntvXUAikS5cXZbeyU1HujGQq5bgo3NIxprJ7tPwbH1kvnI
|
42
|
-
bu0vb0s2wAJssvU38pJ8m0HDrJlNaXGzj6u7TPHtFCBh+nfh07+eVMNWDiADxdwf
|
43
|
-
JZ/aKyau4k1TAs0SVWh5ygBUnlPaCbQdn4xjwg9VQ1rAv5raTA/urEzTY0sjEIW9
|
44
|
-
aAEnrnH12wjBh+CcToxSY8BVzECYYeic4TE99IqzUqBDhvFjfgM8n9NmebFZ/6pB
|
45
|
-
+GE+lv6DYNT2ScMdBP5ljv9j+GMss0ECggEBANSEzoqtnYKN+Ar4Klfa4VGa8Yy5
|
46
|
-
v0EpIr5IqZ2dEMZWoXgxZthb1R68RD50tKI2X05Xrsw8gMlPGl5L0HkfCPdaGGhi
|
47
|
-
+Hrn4ckeUId+NlKfxxdc5bISARP9vV/jdlJ37QOtm7LlLdhHw97Y8tN24E+N6gN0
|
48
|
-
CjXGOEkAW/qT6wg7cFJvl8Ov6FTZrOCSxmzpwNaH04CM6G7lEWB/p/GiXSIULwZz
|
49
|
-
UEuwDbRl+UnDihtR2R5E2BKbXSExFumCm+/34cGIFsd0+vc2x/r74R1FXxoF8Iwc
|
50
|
-
OD6LesfpcEtvc1OckXup1WgQWdef3ESwkh+HRW+JhHCgsy7doLuJ4BfP5VA=
|
51
|
-
-----END RSA PRIVATE KEY-----
|
data/spec/spec.opts
DELETED
data/spec/spec_helper.rb
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
def cwd
|
2
|
-
File.expand_path( File.dirname( __FILE__ ) )
|
3
|
-
end
|
4
|
-
|
5
|
-
require File.join( cwd, '../lib/arachni/rpc/', 'pure' )
|
6
|
-
|
7
|
-
def rpc_opts
|
8
|
-
{
|
9
|
-
:host => 'localhost',
|
10
|
-
:port => 7331,
|
11
|
-
:token => 'superdupersecret',
|
12
|
-
:serializer => Marshal,
|
13
|
-
}
|
14
|
-
end
|
15
|
-
|
16
|
-
def rpc_opts_with_ssl_primitives
|
17
|
-
rpc_opts.merge(
|
18
|
-
:port => 7332,
|
19
|
-
:ssl_ca => cwd + '/pems/cacert.pem',
|
20
|
-
:ssl_pkey => cwd + '/pems/client/key.pem',
|
21
|
-
:ssl_cert => cwd + '/pems/client/cert.pem'
|
22
|
-
)
|
23
|
-
end
|
24
|
-
|
25
|
-
def rpc_opts_with_invalid_ssl_primitives
|
26
|
-
rpc_opts_with_ssl_primitives.merge(
|
27
|
-
:ssl_pkey => cwd + '/pems/client/foo-key.pem',
|
28
|
-
:ssl_cert => cwd + '/pems/client/foo-cert.pem'
|
29
|
-
)
|
30
|
-
end
|
31
|
-
|
32
|
-
def rpc_opts_with_mixed_ssl_primitives
|
33
|
-
rpc_opts_with_ssl_primitives.merge(
|
34
|
-
:ssl_pkey => cwd + '/pems/client/key.pem',
|
35
|
-
:ssl_cert => cwd + '/pems/client/foo-cert.pem'
|
36
|
-
)
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
def start_client( opts )
|
41
|
-
Arachni::RPC::Pure::Client.new( opts )
|
42
|
-
end
|