Module: Ronin::Payloads::Mixins::Tempfile
- Included in:
- Bin::UNIX::ReverseShell, Bin::Windows::ReverseShell
- Defined in:
- lib/ronin/payloads/mixins/tempfile.rb
Overview
Adds support for temporary files.
Instance Method Summary collapse
-
#tempfile(name = nil, ext: nil) {|tempfile| ... } ⇒ Tempfile
Opens a new temporary file.
Instance Method Details
#tempfile(name = nil, ext: nil) {|tempfile| ... } ⇒ Tempfile
Opens a new temporary file.
54 55 56 57 58 59 60 |
# File 'lib/ronin/payloads/mixins/tempfile.rb', line 54 def tempfile(name=nil, ext: nil,&block) basename = if name then "ronin-payloads-#{name}-" else 'ronin-payloads-' end ::Tempfile.open([basename, ext],&block) end |