Cleaned up a little

bug/bundler_fix
Brendan 2016-08-15 12:20:28 -07:00
parent 7730e0eb27
commit 0778b77f7b
1 changed files with 19 additions and 13 deletions

View File

@ -6,6 +6,9 @@ module Msf
class Post class Post
module Windows module Windows
#
# This module serves to hold methods related to .NET framework
#
module Dotnet module Dotnet
include ::Msf::Post::Common include ::Msf::Post::Common
include ::Msf::Post::Windows::Registry include ::Msf::Post::Windows::Registry
@ -17,14 +20,17 @@ module Dotnet
OptInt.new('Dotnet::Post::timeout', [true, 'Dotnet execution timeout, set < 0 to run async without termination', 15]), OptInt.new('Dotnet::Post::timeout', [true, 'Dotnet execution timeout, set < 0 to run async without termination', 15]),
OptBool.new('Dotnet::Post::log_output', [true, 'Write output to log file', false]), OptBool.new('Dotnet::Post::log_output', [true, 'Write output to log file', false]),
OptBool.new('Dotnet::Post::dry_run', [true, 'Return encoded output to caller', false]), OptBool.new('Dotnet::Post::dry_run', [true, 'Return encoded output to caller', false]),
OptBool.new('Dotnet::Post::force_wow64', [true, 'Force WOW64 execution', false]), OptBool.new('Dotnet::Post::force_wow64', [true, 'Force WOW64 execution', false])
], self.class) ],
self.class
)
end end
# #
# Searches the subkey for the value 'Version' which contains the # Searches the subkey for the value 'Version' which contains the
# actual version, rather than the over-arching release # actual version, rather than the over-arching release
# An alternative would be to query for it, and catch the exception. # An alternative would be to query for it, and catch the exception.
# #
def search_for_version(dotnet_subkey) def search_for_version(dotnet_subkey)
dotnet_version = nil dotnet_version = nil
begin begin
@ -67,7 +73,7 @@ module Dotnet
# a windows host # a windows host
# #
def get_dotnet_versions def get_dotnet_versions
ret_val = Array.new ret_val = []
key = 'HKLM\\SOFTWARE\\Microsoft\NET Framework Setup\\NDP' key = 'HKLM\\SOFTWARE\\Microsoft\NET Framework Setup\\NDP'
begin begin
dotnet_keys = registry_enumkeys(key) dotnet_keys = registry_enumkeys(key)