diff --git a/lib/msf/core/evasion.rb b/lib/msf/core/evasion.rb index efda755874..740a77427d 100644 --- a/lib/msf/core/evasion.rb +++ b/lib/msf/core/evasion.rb @@ -286,7 +286,7 @@ module Msf target_idx = begin Integer(datastore['TARGET']) - rescue ArgumentError + rescue ArgumentError, TypeError datastore['TARGET'] end diff --git a/lib/msf/core/exploit.rb b/lib/msf/core/exploit.rb index eda415c1ec..eefce6d5a3 100644 --- a/lib/msf/core/exploit.rb +++ b/lib/msf/core/exploit.rb @@ -686,7 +686,7 @@ class Exploit < Msf::Module target_idx = begin Integer(datastore['TARGET']) - rescue ArgumentError + rescue ArgumentError, TypeError datastore['TARGET'] end diff --git a/lib/msf/ui/console/command_dispatcher/modules.rb b/lib/msf/ui/console/command_dispatcher/modules.rb index 71c102cacd..cf8dd266bd 100644 --- a/lib/msf/ui/console/command_dispatcher/modules.rb +++ b/lib/msf/ui/console/command_dispatcher/modules.rb @@ -643,7 +643,7 @@ module Msf mod_index = begin Integer(mod_name) - 1 - rescue ArgumentError + rescue ArgumentError, TypeError nil end