From c5ba3e0d89bb2eefe5becf563ca9dcb9db8df192 Mon Sep 17 00:00:00 2001 From: Ashley Donaldson Date: Fri, 13 Dec 2024 17:25:23 +1100 Subject: [PATCH] Changes from code review --- lib/msf/core/optional_session.rb | 4 ++-- modules/auxiliary/admin/sccm/get_naa_credentials.rb | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/msf/core/optional_session.rb b/lib/msf/core/optional_session.rb index ab0b255cdcb3..8b4224514e65 100644 --- a/lib/msf/core/optional_session.rb +++ b/lib/msf/core/optional_session.rb @@ -10,7 +10,7 @@ module OptionalSession attr_accessor :session_or_rhost_required - def session_or_rhost_required + def session_or_rhost_required? @session_or_rhost_required.nil? ? true : @session_or_rhost_required end @@ -24,7 +24,7 @@ def validate validate_session elsif rhost validate_rhost - elsif session_or_rhost_required + elsif session_or_rhost_required? raise Msf::OptionValidateError.new(message: 'A SESSION or RHOST must be provided') end end diff --git a/modules/auxiliary/admin/sccm/get_naa_credentials.rb b/modules/auxiliary/admin/sccm/get_naa_credentials.rb index 974680a5e7fa..9dba414543ee 100644 --- a/modules/auxiliary/admin/sccm/get_naa_credentials.rb +++ b/modules/auxiliary/admin/sccm/get_naa_credentials.rb @@ -5,6 +5,7 @@ require 'time' require 'nokogiri' require 'rasn1' +require 'pry-byebug' class MetasploitModule < Msf::Auxiliary include Msf::Auxiliary::Report