Store a uuid for each module, track this in sessions
git-svn-id: file:///home/svn/framework3/trunk@8937 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
56e2f73e59
commit
9277f060a7
|
@ -212,6 +212,7 @@ class FrameworkEventSubscriber
|
|||
:username => instance.owner,
|
||||
:info => {
|
||||
:module_name => instance.fullname,
|
||||
:module_uuid => instance.uuid
|
||||
}.merge(opts)
|
||||
}
|
||||
|
||||
|
@ -286,7 +287,8 @@ class FrameworkEventSubscriber
|
|||
:target_host => session.target_host,
|
||||
:via_exploit => session.via_exploit,
|
||||
:via_payload => session.via_payload,
|
||||
:tunnel_peer => session.tunnel_peer
|
||||
:tunnel_peer => session.tunnel_peer,
|
||||
:exploit_uuid => session.exploit_uuid
|
||||
}.merge(opts)
|
||||
}
|
||||
report_event(event)
|
||||
|
|
|
@ -109,6 +109,7 @@ class Module
|
|||
#
|
||||
def initialize(info = {})
|
||||
self.module_info = info
|
||||
self.uuid = Rex::Text.rand_text_alphanumeric(8).downcase
|
||||
|
||||
set_defaults
|
||||
|
||||
|
@ -605,6 +606,11 @@ class Module
|
|||
#
|
||||
attr_accessor :error
|
||||
|
||||
#
|
||||
# A unique identifier for this module instance
|
||||
#
|
||||
attr_accessor :uuid
|
||||
|
||||
protected
|
||||
|
||||
#
|
||||
|
|
|
@ -78,7 +78,7 @@ module Session
|
|||
|
||||
def initialize
|
||||
self.alive = true
|
||||
self.uuid = Rex::Text.rand_text_alphanumeric(32).downcase
|
||||
self.uuid = Rex::Text.rand_text_alphanumeric(8).downcase
|
||||
end
|
||||
|
||||
# Direct descendents
|
||||
|
@ -217,6 +217,7 @@ module Session
|
|||
self.exploit_datastore = m.datastore
|
||||
self.user_input = m.user_input if m.user_input
|
||||
self.user_output = m.user_output if m.user_output
|
||||
self.exploit_uuid = m.uuid
|
||||
end
|
||||
|
||||
#
|
||||
|
@ -298,6 +299,10 @@ module Session
|
|||
#
|
||||
attr_accessor :uuid
|
||||
#
|
||||
# The unique identifier of exploit that created this session
|
||||
#
|
||||
attr_accessor :exploit_uuid
|
||||
#
|
||||
# The associated username
|
||||
#
|
||||
attr_accessor :username
|
||||
|
|
Loading…
Reference in New Issue