fix history issues as stated in #10423

GSoC/Meterpreter_Web_Console
Auxilus 2018-08-06 11:27:47 +05:30 committed by GitHub
parent b21d73a170
commit cb01216e0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -21,6 +21,7 @@ module Shell
### ###
module InputShell module InputShell
attr_accessor :prompt, :output attr_accessor :prompt, :output
@hist_last_added = nil
def pgets def pgets
@ -210,7 +211,10 @@ module Shell
# command, create the file if it doesn't exist # command, create the file if it doesn't exist
if ret and self.histfile if ret and self.histfile
File.open(self.histfile, "a+") { |f| File.open(self.histfile, "a+") { |f|
f.puts(line) if not @hist_last_added == line
f.puts(line)
@hist_last_added = line
end
} }
end end
self.stop_count = 0 self.stop_count = 0