February 2018
Intermediate to advanced
426 pages
11h 3m
English
Let's start with the analysis of the main script body to understand how it works:
if datastore['RESOURCE'] if ::File.exist?(datastore['RESOURCE']) ::File.open(datastore['RESOURCE']).each_line do |cmd| next if cmd.strip.length < 1 next if cmd[0,1] == "#" print_status "Running command #{cmd.chomp}" result = wmic_query(cmd.chomp) store_wmic_loot(result, cmd) end else raise "Resource File does not exists!" end
elsif datastore['COMMAND'] cmd = datastore['COMMAND'] result = wmic_query(cmd) store_wmic_loot(result, cmd) ...
Read now
Unlock full access