diff --git a/lib/msf/core/module.rb b/lib/msf/core/module.rb index 6a4b7c862b..9c56e74d4f 100644 --- a/lib/msf/core/module.rb +++ b/lib/msf/core/module.rb @@ -179,7 +179,15 @@ class Module datastore['TimestampOutput'] =~ /^(t|y|1)/i or framework.datastore['TimestampOutput'] =~ /^(t|y|1)/i ) - return "[#{Time.now.strftime("%Y.%m.%d-%H:%M:%S")}] " + prefix = "[#{Time.now.strftime("%Y.%m.%d-%H:%M:%S")}] " + + xn ||= datastore['ExploitNumber'] + xn ||= framework.datastore['ExploitNumber'] + if xn.is_a?(Fixnum) + prefix << "[%04d] " % xn + end + + return prefix end "" end