arachni-reactor 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/LICENSE.md +1 -1
- data/README.md +2 -2
- data/lib/arachni/reactor.rb +14 -10
- data/lib/arachni/reactor/connection/error.rb +1 -1
- data/lib/arachni/reactor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dd8da14a563d174b01b3ec556dc10b17bf7212a
|
4
|
+
data.tar.gz: a554df83d1fdec6fb709179fa11947c343d24f0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e868cd76cea63175be7f8675a1b3f7fc293c58994a5875ca2e6923d98fafb500d70ba547f9f14a5c330bb468c71630fe2c1d1f6dbb8179f86a53228b74a495
|
7
|
+
data.tar.gz: cf5a704e69e255edc2f54ddaef55a56003b9f70d88f33bc270392afed13ecb1563bdc2563a41bf696e0d45bcfc4a09708b61a55fce4c7a79645ddf534c456cad
|
data/CHANGELOG.md
CHANGED
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<table>
|
4
4
|
<tr>
|
5
5
|
<th>Version</th>
|
6
|
-
<td>0.1.
|
6
|
+
<td>0.1.2</td>
|
7
7
|
</tr>
|
8
8
|
<tr>
|
9
9
|
<th>Github page</th>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
</tr>
|
24
24
|
<tr>
|
25
25
|
<th>Copyright</th>
|
26
|
-
<td>2014-
|
26
|
+
<td>2014-2017 <a href="http://www.sarosys.com">Sarosys LLC</a></td>
|
27
27
|
</tr>
|
28
28
|
<tr>
|
29
29
|
<th>License</th>
|
data/lib/arachni/reactor.rb
CHANGED
@@ -692,24 +692,28 @@ class Reactor
|
|
692
692
|
# @return [Array<Socket>]
|
693
693
|
# Sockets of all connections, we want to be ready to read at any time.
|
694
694
|
def read_sockets
|
695
|
-
|
695
|
+
s = []
|
696
|
+
@connections.each do |_, connection|
|
696
697
|
next if !connection.listener? && !connection.connected?
|
697
|
-
connection.socket
|
698
|
-
end
|
699
|
-
|
700
|
-
|
701
|
-
def all_sockets
|
702
|
-
@connections.values.map(&:socket)
|
698
|
+
s << connection.socket
|
699
|
+
end
|
700
|
+
s
|
703
701
|
end
|
704
702
|
|
705
703
|
# @return [Array<Socket>]
|
706
704
|
# Sockets of connections with
|
707
705
|
# {Connection#has_outgoing_data? outgoing data}.
|
708
706
|
def write_sockets
|
709
|
-
|
707
|
+
s = []
|
708
|
+
@connections.each do |_, connection|
|
710
709
|
next if connection.connected? && !connection.has_outgoing_data?
|
711
|
-
connection.socket
|
712
|
-
end
|
710
|
+
s << connection.socket
|
711
|
+
end
|
712
|
+
s
|
713
|
+
end
|
714
|
+
|
715
|
+
def all_sockets
|
716
|
+
@connections.values.map(&:socket)
|
713
717
|
end
|
714
718
|
|
715
719
|
def connections_from_sockets( sockets )
|
@@ -24,7 +24,7 @@ class Error < Arachni::Reactor::Error
|
|
24
24
|
# @param [Block] block Block to run.
|
25
25
|
def translate( &block )
|
26
26
|
block.call
|
27
|
-
rescue IOError, Errno::ENOTCONN => e
|
27
|
+
rescue IOError, Errno::ENOTCONN, Errno::ENOTSOCK => e
|
28
28
|
raise_with_proper_backtrace( e, Closed )
|
29
29
|
rescue SocketError, Errno::ENOENT => e
|
30
30
|
raise_with_proper_backtrace( e, HostNotFound )
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arachni-reactor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tasos Laskos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Arachni::Reactor is a simple, lightweight, pure-Ruby implementation of the Reactor
|