Make a Session record before using it

How about that.
bug/bundler_fix
James Lee 2015-04-01 13:12:28 -05:00
parent f4977bf606
commit 8c1a597a25
No known key found for this signature in database
GPG Key ID: 2D6094C7CEA0A321
1 changed files with 8 additions and 7 deletions

View File

@ -187,13 +187,6 @@ module Msf::DBManager::Session
via_payload: session.via_payload, via_payload: session.via_payload,
} }
if session.exploit_task and session.exploit_task.record
session_task = session.exploit_task.record
if session_task.class == Mdm::Task
Mdm::TaskSession.create(task: session_task, session: s )
end
end
# In the case of multi handler we cannot yet determine the true # In the case of multi handler we cannot yet determine the true
# exploit responsible. But we can at least show the parent versus # exploit responsible. But we can at least show the parent versus
# just the generic handler: # just the generic handler:
@ -202,6 +195,14 @@ module Msf::DBManager::Session
end end
s = ::Mdm::Session.create!(sess_data) s = ::Mdm::Session.create!(sess_data)
if session.exploit_task and session.exploit_task.record
session_task = session.exploit_task.record
if session_task.class == Mdm::Task
Mdm::TaskSession.create(task: session_task, session: s )
end
end
s s
} }
end end