#!/usr/bin/env ruby
# frozen_string_literal: true

require 'memory_profiler' # https://github.com/SamSaffron/memory_profiler
require 'wpscan'

report = MemoryProfiler.report(top: 15) do
  WPScan::Scan.new do |s|
    s.controllers <<
      WPScan::Controller::VulnApi.new <<
      WPScan::Controller::CustomDirectories.new <<
      WPScan::Controller::InterestingFindings.new <<
      WPScan::Controller::WpVersion.new <<
      WPScan::Controller::MainTheme.new <<
      WPScan::Controller::Enumeration.new <<
      WPScan::Controller::PasswordAttack.new <<
      WPScan::Controller::Aliases.new

    s.run
  end
end

report.pretty_print(scale_bytes: true, to_file: 'memprof.report')
