Skip to content

Commit 849d974

Browse files
David MaloneyDavid Maloney
authored andcommitted
Add session_port to the mdm object
Mdm::Session was not being passed the session_port FIXRM rapid7#7281
1 parent e169cca commit 849d974

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

lib/msf/core/db.rb

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -721,17 +721,18 @@ def report_session(opts)
721721
h_opts[:workspace] = wspace
722722
host = find_or_create_host(h_opts)
723723
sess_data = {
724-
:host_id => host.id,
725-
:stype => session.type,
726-
:desc => session.info,
727-
:platform => session.platform,
728-
:via_payload => session.via_payload,
729-
:via_exploit => session.via_exploit,
730-
:routes => [],
731-
:datastore => session.exploit_datastore.to_h,
732-
:opened_at => Time.now.utc,
733-
:last_seen => Time.now.utc,
734-
:local_id => session.sid
724+
:host_id => host.id,
725+
:stype => session.type,
726+
:desc => session.info,
727+
:platform => session.platform,
728+
:via_payload => session.via_payload,
729+
:via_exploit => session.via_exploit,
730+
:routes => [],
731+
:datastore => session.exploit_datastore.to_h,
732+
:port => session.session_port,
733+
:opened_at => Time.now.utc,
734+
:last_seen => Time.now.utc,
735+
:local_id => session.sid
735736
}
736737
elsif opts[:host]
737738
raise ArgumentError.new("Invalid :host, expected Host object") unless opts[:host].kind_of? ::Mdm::Host

0 commit comments

Comments
 (0)