Add the ability to specify mode in Rex output file
* Because sometimes you might want to append * Preserves original hardcoded 'wb' as default * http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.htmlbug/bundler_fix
parent
bfc7bfdd9a
commit
f658efe144
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue