Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/msf/core/module/uuid.rb
19612 views
1
# NOTE: Metasploit does not use real UUIDs currently.
2
# To modify this to be a real UUID we will need to do a database migration.
3
# See: https://github.com/rapid7/metasploit-framework/pull/20170
4
module Msf::Module::UUID
5
UUID_CHARS = [*('a'..'z'), *('0'..'9')].freeze
6
private_constant :UUID_CHARS
7
8
#
9
# Attributes
10
#
11
12
# @return [String] A unique identifier for this module instance
13
def uuid
14
@uuid ||= UUID_CHARS.sample(8).join
15
end
16
17
protected
18
19
#
20
# Attributes
21
#
22
23
# @!attribute [w] uuid
24
attr_writer :uuid
25
end
26
27