Make session list show the encryption status

Both extended and verbose session logging will show which of the
sessions has the encryption enabled as it's not yet supported on all
sessions.
bug/bundler_fix
OJ 2017-06-26 16:41:58 +10:00
parent 9f2be21eb7
commit 3c767552e9
No known key found for this signature in database
GPG Key ID: D5DC61FB93260597
1 changed files with 11 additions and 2 deletions

View File

@ -541,6 +541,7 @@ class ReadableText
columns << 'Id' columns << 'Id'
columns << 'Type' columns << 'Type'
columns << 'Checkin?' if show_extended columns << 'Checkin?' if show_extended
columns << 'Enc?' if show_extended
columns << 'Local URI' if show_extended columns << 'Local URI' if show_extended
columns << 'Information' columns << 'Information'
columns << 'Connection' columns << 'Connection'
@ -575,6 +576,12 @@ class ReadableText
row << '?' row << '?'
end end
if session.respond_to?(:aes_key) && session.aes_key
row << "Y"
else
row << 'N'
end
if session.exploit_datastore.has_key?('LURI') && !session.exploit_datastore['LURI'].empty? if session.exploit_datastore.has_key?('LURI') && !session.exploit_datastore['LURI'].empty?
row << " (#{session.exploit_datastore['LURI']})" row << " (#{session.exploit_datastore['LURI']})"
else else
@ -616,12 +623,13 @@ class ReadableText
sess_uuid = session.payload_uuid.to_s sess_uuid = session.payload_uuid.to_s
sess_puid = session.payload_uuid.respond_to?(:puid_hex) ? session.payload_uuid.puid_hex : nil sess_puid = session.payload_uuid.respond_to?(:puid_hex) ? session.payload_uuid.puid_hex : nil
sess_luri = session.exploit_datastore['LURI'] || "" sess_luri = session.exploit_datastore['LURI'] || ""
sess_enc = (session.respond_to?(:aes_key) ? session.aes_key : nil) != nil
sess_checkin = "<none>" sess_checkin = "<none>"
sess_registration = "No" sess_registration = "No"
if session.respond_to? :platform if session.respond_to?(:platform)
sess_type << (" " + session.platform) sess_type << " " + session.platform
end end
if session.respond_to?(:last_checkin) && session.last_checkin if session.respond_to?(:last_checkin) && session.last_checkin
@ -640,6 +648,7 @@ class ReadableText
out << " Info: #{sess_info}\n" out << " Info: #{sess_info}\n"
out << " Tunnel: #{sess_tunnel}\n" out << " Tunnel: #{sess_tunnel}\n"
out << " Via: #{sess_via}\n" out << " Via: #{sess_via}\n"
out << " Encrypted: #{sess_enc}\n"
out << " UUID: #{sess_uuid}\n" out << " UUID: #{sess_uuid}\n"
out << " CheckIn: #{sess_checkin}\n" out << " CheckIn: #{sess_checkin}\n"
out << " Registered: #{sess_registration}\n" out << " Registered: #{sess_registration}\n"