Skip to content

Commit f073e78

Browse files
authored
replaced hardcoded value variable
1 parent 9682866 commit f073e78

File tree

1 file changed

+3
-2
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def initialize(driver)
137137
@cache_payloads = nil
138138
@previous_module = nil
139139
@module_name_stack = []
140+
@history_limit = 100
140141
end
141142

142143
#
@@ -480,7 +481,7 @@ def cmd_exit(*args)
480481

481482
def cmd_history(*args)
482483

483-
limit = 100
484+
limit = @history_limit
484485
length = Readline::HISTORY.length
485486

486487
@@history_opts.parse(args) do |opt, _idx, val|
@@ -507,7 +508,7 @@ def cmd_history_help
507508
print_line "Usage: history [options]"
508509
print_line
509510
print_line "Shows the command history."
510-
print_line "If -n is not set, it will only be shown the last 100 commands"
511+
print_line "If -n is not set, it will only be shown the last #{@history_limit} commands"
511512
print_line
512513
print @@history_opts.usage
513514
end

0 commit comments

Comments
 (0)