File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
lib/rex/post/meterpreter/channels Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,8 @@ module Meterpreter
18
18
###
19
19
module SocketAbstraction
20
20
21
- class << self
22
- def cls
23
- raise NotImplementedError
24
- end
25
- end
26
-
27
21
module SocketInterface
28
- def type?
29
- raise NotImplementedError
30
- end
22
+ include Rex ::Socket
31
23
32
24
def getsockname
33
25
return super if not channel
@@ -46,9 +38,8 @@ def getsockname
46
38
47
39
def getpeername
48
40
return super if not channel
49
- address_family , _caddr , _cport = channel . client . sock . getpeername_as_array
50
41
maddr , mport = [ channel . params . peerhost , channel . params . peerport ]
51
- [ address_family , " #{ maddr } " , " #{ mport } " ]
42
+ :: Socket . sockaddr_in ( mport , maddr )
52
43
end
53
44
54
45
%i{ localhost localport peerhost peerport } . map do |meth |
You can’t perform that action at this time.
0 commit comments