rex-socket 0.1.48 → 0.1.49

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6894414c673fee731f0c6bcfc869f8cf31e80d0fdb1f4c8fe7e9ef3392240f87
4
- data.tar.gz: c18cb6da9934c2b7ff1702672fb34e43ecddea590578e60ad7dddc557650aa64
3
+ metadata.gz: 3094879e49eec452993a7285a7423c92f80750e21482c93f1161a9863bc63b35
4
+ data.tar.gz: 8948da7edd9356d433f41661b25edab5e4af5a86c7156f5f8f9c198c1edccd0a
5
5
  SHA512:
6
- metadata.gz: d8e9050d6776686079e75d45ec3541f84de8adfbf416687b95e6a659afe9ed9cb439e808caec9022e78328562362ea4b7abf6aee858c584644a913011de264a4
7
- data.tar.gz: 705a73fe6836686aab49e49678a3131fa07dbdbe1925974d7280820b1275447908c29d36c21bfe714501526ba4ea40564a699c7e18e5105b5ec925a3653e7bc0
6
+ metadata.gz: 6bc286aac40859d28d7b3c96544c0cc8794df9763c485533bd9f28174c872db0d3919a632a7fd9ae71a97178b2e2a8a8d660467a3833384f820dc8b81ef1d0ec
7
+ data.tar.gz: aa991acb7049aa46d2d57fcaf8ee17a42f4a8fd2fee04e485e732a3451dd54c1d36a17fbe74c794d4903b61fd55a30b4de558e88a72b6a55ed72cf7f92b8a2cd
checksums.yaml.gz.sig CHANGED
Binary file
@@ -234,6 +234,29 @@ begin
234
234
  total_sent
235
235
  end
236
236
 
237
+ #
238
+ # Polls the stream to see if there is any read data available. Returns
239
+ # true if data is available for reading, otherwise false is returned.
240
+ #
241
+ def has_read_data?(timeout = nil)
242
+ return true if self.sslsock.pending > 0
243
+
244
+ # Allow a timeout of "0" that waits almost indefinitely for input, this
245
+ # mimics the behavior of Rex::ThreadSafe.select() and fixes some corner
246
+ # cases of unintentional no-wait timeouts.
247
+ timeout = 3600 if (timeout and timeout == 0)
248
+
249
+ begin
250
+ s = Rex::ThreadSafe.select( [ self.sslsock ], nil, nil, timeout )
251
+ return !( s == nil || s[0] == nil )
252
+ rescue ::Errno::EBADF, ::Errno::ENOTSOCK
253
+ raise ::EOFError
254
+ rescue StreamClosedError, ::IOError, ::EOFError, ::Errno::EPIPE
255
+ # Return false if the socket is dead
256
+ return false
257
+ end
258
+ end
259
+
237
260
  #
238
261
  # Reads data from the SSL socket.
239
262
  #
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Socket
3
- VERSION = "0.1.48"
3
+ VERSION = "0.1.49"
4
4
  end
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rex-socket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.48
4
+ version: 0.1.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2023-03-14 00:00:00.000000000 Z
96
+ date: 2023-03-23 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: rake
metadata.gz.sig CHANGED
@@ -1,3 +1,3 @@
1
-
2
- lPs>�����=>��T��U�����
3
- <I��T/�)}����E=��SB�����[5�]P�L� a��o�;���/��<L6�F��=iH��±Ȗ�KZu����B�x��u�;s�Ք5G匽 M����i�W�G\o!��t!���c"�+dG��-b�J����aR5A��k U�{��5G�O-�@|i/�/�d��v�0���^��nU�<�2$x����:�5�Ǩ�'�*1�e���"�b��
1
+ s���;�>�������zo1�E��7 �0�+n�-�B�]0�*�C׊� �)�I"
2
+ �/�
3
+ ��Ū�9Aʽrg��ht��pu�^^?��������#���M��ޚ�:�O��*J�L������1Qx�@����WI�/s [M�λK��P�B�>���H����������&F��}7.�B