Improve file operations
Hmm, why did I not use File.write before? Oh well, fixed.GSoC/Meterpreter_Web_Console
parent
808e2f2e25
commit
321f2b8746
|
@ -495,7 +495,7 @@ class Core
|
|||
|
||||
# Portable file truncation?
|
||||
if File.writable?(Msf::Config.history_file)
|
||||
File.open(Msf::Config.history_file, 'w') {}
|
||||
File.write(Msf::Config.history_file, '')
|
||||
end
|
||||
|
||||
print_good('Command history and history file cleared')
|
||||
|
|
|
@ -139,7 +139,7 @@ module Msf
|
|||
framework.jobs.each_key do |i|
|
||||
framework.jobs.stop_job(i)
|
||||
end
|
||||
File.truncate(Msf::Config.persist_file,0) if File.exist?(Msf::Config.persist_file)
|
||||
File.write(Msf::Config.persist_file, '') if File.writable?(Msf::Config.persist_file)
|
||||
when "-i"
|
||||
# Defer printing anything until the end of option parsing
|
||||
# so we can check for the verbose flag.
|
||||
|
|
Loading…
Reference in New Issue