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.
223 224 225 |
# File 'lib/rex/pescan/analyze.rb', line 223 def initialize(pe) self.pe = pe end |
Instance Attribute Details
#pe ⇒ Object
Returns the value of attribute pe.
221 222 223 |
# File 'lib/rex/pescan/analyze.rb', line 221 def pe @pe end |
Instance Method Details
#scan(param) ⇒ Object
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/rex/pescan/analyze.rb', line 227 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 |