Land #2938, @wchen-r7's peer, rhost, rport methods addition to post modules

bug/bundler_fix
jvazquez-r7 2014-02-03 09:43:30 -06:00
commit d5709c51cc
No known key found for this signature in database
GPG Key ID: 38D99152B9352D83
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+
#