Skip to content

Commit 6eae3b3

Browse files
committed
Add session name output to ReadableText
1 parent 70a82b5 commit 6eae3b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/msf/base/serializer/readable_text.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ def self.dump_sessions(framework, opts={})
539539

540540
columns = []
541541
columns << 'Id'
542+
columns << 'Name'
542543
columns << 'Type'
543544
columns << 'Checkin?' if show_extended
544545
columns << 'Local URI' if show_extended
@@ -561,6 +562,7 @@ def self.dump_sessions(framework, opts={})
561562

562563
row = []
563564
row << session.sid.to_s
565+
row << session.sname.to_s
564566
row << session.type.to_s
565567
if session.respond_to?(:session_type)
566568
row[-1] << (" " + session.session_type)
@@ -610,6 +612,7 @@ def self.dump_sessions_verbose(framework, opts={})
610612

611613
sess_info = session.info.to_s
612614
sess_id = session.sid.to_s
615+
sess_name = session.sname.to_s
613616
sess_tunnel = session.tunnel_to_s + " (#{session.session_host})"
614617
sess_via = session.via_exploit.to_s
615618
sess_type = session.type.to_s
@@ -636,6 +639,7 @@ def self.dump_sessions_verbose(framework, opts={})
636639
end
637640

638641
out << " Session ID: #{sess_id}\n"
642+
out << " Name: #{sess_name}\n"
639643
out << " Type: #{sess_type}\n"
640644
out << " Info: #{sess_info}\n"
641645
out << " Tunnel: #{sess_tunnel}\n"

0 commit comments

Comments
 (0)