Add method rhost, rport, and peer for post modules

[SeeRM #8761]
bug/bundler_fix
sinn3r 2014-02-03 01:05:43 -06:00
parent 38bc587228
commit 2ee1764ceb
1 changed files with 22 additions and 0 deletions

View File

@ -2,6 +2,28 @@
module Msf::Post::Common
def rhost
case session.type
when 'meterpreter'
session.sock.peerhost
when 'shell'
session.session_host
end
end
def rport
case session.type
when 'meterpreter'
session.sock.peerport
when 'shell'
session.session_port
end
end
def peer
"#{rhost}:#{rport}"
end
#
# Checks if the remote system has a process with ID +pid+
#