Parent

Methods

Class/Module Index [+]

Quicksearch

Rex::PeScan::Analyze::Ripper

Attributes

pe[RW]

Public Class Methods

new(pe) click to toggle source
# File lib/rex/pescan/analyze.rb, line 279
def initialize(pe)
        self.pe = pe
end

Public Instance Methods

scan(param) click to toggle source
# File lib/rex/pescan/analyze.rb, line 283
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

[Validate]

Generated with the Darkfish Rdoc Generator 2.