Skip to content

Commit 9017aa0

Browse files
author
Tod Beardsley
committed
Avoid magic number to make @wvu marginally happier
1 parent e88c4f1 commit 9017aa0

File tree

1 file changed

+4
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+4
-1
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ class Core
101101
# Constant for disclosure date formatting in search functions
102102
DISCLOSURE_DATE_FORMAT = "%Y-%m-%d"
103103

104+
# Constant for a retry timeout on using modules before they're loaded
105+
CMD_USE_TIMEOUT = 3
106+
104107
# Returns the list of commands supported by this command dispatcher
105108
def commands
106109
{
@@ -2421,7 +2424,7 @@ def cmd_use(*args)
24212424
mod = framework.modules.create(mod_name)
24222425
unless mod
24232426
# Try one more time; see #4549
2424-
sleep 3
2427+
sleep CMD_USE_TIMEOUT
24252428
mod = framework.modules.create(mod_name)
24262429
unless mod
24272430
print_error("Failed to load module: #{mod_name}")

0 commit comments

Comments
 (0)