diff --git a/lib/rex/ui/text/output/file.rb b/lib/rex/ui/text/output/file.rb index c3b9523778..e55f832282 100644 --- a/lib/rex/ui/text/output/file.rb +++ b/lib/rex/ui/text/output/file.rb @@ -14,8 +14,8 @@ class Output::File < Rex::Ui::Text::Output attr_accessor :fd - def initialize(path) - self.fd = ::File.open(path, "wb") + def initialize(path, mode='wb') + self.fd = ::File.open(path, mode) end def supports_color?