From 95a95d45ec8c35387a64c4e71c8fd52012a4cfee Mon Sep 17 00:00:00 2001 From: James Lee Date: Tue, 8 Jan 2013 12:08:40 -0600 Subject: [PATCH] Fix importing msfxml files containing a session [See #1179][SeeRM #7669] --- lib/msf/core/db.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index 02119790c8..95abe10e2a 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -675,11 +675,11 @@ class DBManager if sess_data[:desc] sess_data[:desc] = sess_data[:desc][0,255] end - + # In the case of multi handler we cannot yet determine the true # exploit responsible. But we can at least show the parent versus # just the generic handler: - if session.via_exploit == "exploit/multi/handler" + if session and session.via_exploit == "exploit/multi/handler" sess_data[:via_exploit] = sess_data[:datastore]['ParentModule'] end