22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# File 'lib/metadata/ScanProfile/modules/VmScanItemFile.rb', line 22
def parse_data(vm, data, &_blk)
if data.nil?
st = Time.now
$log.info "Scanning [Profile-Files] information."
yield({:msg => 'Scanning Profile-File'}) if block_given?
scan_definition["stats"].each do |d|
begin
options = {'contents' => d['content']}
d["data"] = MD5deep.scan_glob(vm.rootTrees[0], d["target"], options) if d["data"].nil?
rescue
end
end
$log.info "Scanning [Profile-Files] information ran for [#{Time.now - st}] seconds."
end
end
|