Skip to content

Commit

Permalink
Commenting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
smashery committed Nov 22, 2024
1 parent 9bd27e4 commit 6f4ab97
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/msf/core/windows_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,13 @@ def xp_or_2003?

# Get the string representation of the OS, given a major, minor and build number
# (as reported by an NTLM handshake).
# The NTLM structure makes no guarantee that it is actually Windows, so if we
# don't find a precise match, return nil
# The NTLM structure makes no guarantee that the underlying OS of the server is
# actually Windows, so if we don't find a precise match, return nil
#
# @param major [Integer] The major build number reported in the NTLM handshake
# @param minor [Integer] The minor build number reported in the NTLM handshake
# @param build [Integer] The build build number reported in the NTLM handshake
# @return [String] The possible matching OS versions, or nil if no identical match can be found
# @return [String] The possible matching OS versions, or nil if no corresponding match can be found
def self.from_ntlm_os_version(major, minor, build)
workstation_string = self.version_string(major, minor, build, WorkstationSpecificVersions, WorkstationNameMapping)
server_string = self.version_string(major, minor, build, ServerSpecificVersions, ServerNameMapping)
Expand Down Expand Up @@ -287,7 +288,7 @@ def major_release_name
return nil
end

# Get a Windows OS string from a version, given a set of version constants
# Get a Windows OS version string representation for a given major, minor and build number
def self.version_string(major, minor, build, version_module, mapping)
version_module.constants.each do |version_sym|
version = version_module.const_get(version_sym)
Expand Down

0 comments on commit 6f4ab97

Please sign in to comment.