Class: Rex::PeScan::Analyze::Ripper
- Inherits:
-
Object
- Object
- Rex::PeScan::Analyze::Ripper
- Defined in:
- lib/rex/pescan/analyze.rb
Instance Attribute Summary collapse
-
#pe ⇒ Object
Returns the value of attribute pe.
Instance Method Summary collapse
-
#initialize(pe) ⇒ Ripper
constructor
A new instance of Ripper.
- #scan(param) ⇒ Object
Constructor Details
#initialize(pe) ⇒ Ripper
Returns a new instance of Ripper.
280 281 282 |
# File 'lib/rex/pescan/analyze.rb', line 280 def initialize(pe) self.pe = pe end |
Instance Attribute Details
#pe ⇒ Object
Returns the value of attribute pe.
278 279 280 |
# File 'lib/rex/pescan/analyze.rb', line 278 def pe @pe end |
Instance Method Details
#scan(param) ⇒ Object
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/rex/pescan/analyze.rb', line 284 def scan(param) dest = param['dir'] if (param['file']) dest = File.join(dest, File.basename(param['file'])) end ::FileUtils.mkdir_p(dest) pe.resources.keys.sort.each do |rkey| res = pe.resources[rkey] path = File.join(dest, rkey.split('/')[1] + '_' + res.file) fd = File.new(path, 'wb') fd.write(res.data) fd.close end end |