silence warnings for all users

This commit is contained in:
dwelch-r7 2020-05-05 12:34:44 +01:00
parent eaa9904676
commit b05d01f39b
2 changed files with 7 additions and 1 deletions

View File

@ -8,7 +8,8 @@
require 'pathname'
begin
# TODO: Temporary until warnings can be turned on only for developers to prevent confusion for end users
# Silences warnings as they only serve to confuse end users
if defined?(Warning) && Warning.respond_to?(:[]=)
Warning[:deprecated] = false
end

View File

@ -8,6 +8,11 @@ class UsageError < MsfVenomError; end
require 'optparse'
require 'timeout'
# Silences warnings as they only serve to confuse end users
if defined?(Warning) && Warning.respond_to?(:[]=)
Warning[:deprecated] = false
end
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))