rex-socket 0.1.22 → 0.1.23

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 314afb7251f312c317eca7741cdd3ce3e5136ce02ac0faccec827f0124b8b253
4
- data.tar.gz: 61a2d745cfe3d490fb3114945e8d4b8033e521b9e037efe9c407abc3a9306dca
3
+ metadata.gz: 3a33eccf6509da043ca550670f24c63d6ba5570585f3fc2325f5223bc4aff97b
4
+ data.tar.gz: 6c64549bf503703c498aa43eef47cd8d80c112f770f16d5ae79c3edbf5306eb0
5
5
  SHA512:
6
- metadata.gz: 71fb7ba1ea13d3b0a92a503397c3a0ad2f59994bc3f8c0cd0b425a827ccca876f5aa3f44c2320b37be7443268a6851a4da0ab6623c5d7af257b48dc13a5ae839
7
- data.tar.gz: b542007ef2c4b31a28873304120180f17c7604a0a773da475c154af0f01a2371d3ccb74746f60452a7000829bc4d699b4f06b3a9623512c636ffd5a36dc71b88
6
+ metadata.gz: 9c14624e4341560dbfbab361160d3f90a0674a9ddc09876f49a34fa5ff0c8e4f7f142b5060a82be8fa4ea80be6a004e733876e6dcba78aebb0bd0641a635a584
7
+ data.tar.gz: 8ccbaaaf6dc9ae3b53dacdf15d5031581b6efe8b9fb15cf8f841968783ffe67114b71d1b24caf79d0332c5983cf189f02eb7192e01b53caed769a653aba5f4b6
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- }�잷q���* ̹~irk����k(� �N��;7u��r��"y�Y&e�%�3 ����.�u���C5;�����sKZ8��.�g_ؼ_Z�W)N��'�%�OVU��$�~�ś�O�Ȩ�H?�S����?�� CH1��\��歹 A.G/7���̧�lQe�V�K�
1
+ �ùW�N��4xOQlE���Kf���u�n��V{dUfp&��ö�x]tP6gU�ҕ����L������Pn�)�$����o}:�lth�ʈ�!�6~�F�V����L#H��V1N����1<(��^��k��
2
+ �N �^I���ٚ�!��s۽�'�b O�
@@ -732,14 +732,19 @@ module Socket
732
732
  end
733
733
 
734
734
  #
735
- # Wrapper around getsockname
735
+ # Wrapper around getsockname that stores the local address and local port values.
736
736
  #
737
737
  def getlocalname
738
- getsockname
738
+ if self.localhost.nil? && self.localport.nil?
739
+ _, self.localhost, self.localport = getsockname
740
+ end
741
+
742
+ family = Socket.is_ipv4?(self.localhost) ? ::Socket::AF_INET : ::Socket::AF_INET6
743
+ [family, self.localhost, self.localport]
739
744
  end
740
745
 
741
746
  #
742
- # Return peer connection information.
747
+ # Returns peer connection information as an array.
743
748
  #
744
749
  def getpeername_as_array
745
750
  peer_name = nil
@@ -61,6 +61,11 @@ module Rex::Socket::TcpServer
61
61
 
62
62
  t.peerhost = pn[1]
63
63
  t.peerport = pn[2]
64
+
65
+ ln = t.getlocalname
66
+
67
+ t.localhost = ln[1]
68
+ t.localport = ln[2]
64
69
  end
65
70
 
66
71
  t
@@ -1,5 +1,5 @@
1
1
  module Rex
2
2
  module Socket
3
- VERSION = "0.1.22"
3
+ VERSION = "0.1.23"
4
4
  end
5
5
  end
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.22
4
+ version: 0.1.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Maloney
@@ -93,7 +93,7 @@ cert_chain:
93
93
  JI/W23RbIRksG2pioMhd4dCXq3FLLlkOV1YfCwWixNB+iIhQPPZVaPNfgPhCn4Dt
94
94
  DeGjje/qA4fkLtRmOtb9PUBq3ToRDE4=
95
95
  -----END CERTIFICATE-----
96
- date: 2020-03-04 00:00:00.000000000 Z
96
+ date: 2020-03-21 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: bundler
metadata.gz.sig CHANGED
Binary file