Merges with Master (and solves conflicts)

This commit is contained in:
erwanlr
2019-03-24 13:01:29 +00:00
27 changed files with 245 additions and 80 deletions

21
bin/wpscan-memprof Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env ruby
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::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')

24
bin/wpscan-stackprof Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env ruby
require 'stackprof' # https://github.com/tmm1/stackprof
require 'wpscan'
# The object mode produces a segfault currently: https://github.com/jfelchner/ruby-progressbar/issues/153
# StackProf.run(mode: :object, out: '/tmp/stackprof-object.dump') do
# StackProf.run(mode: :wall, out: '/tmp/stackprof-wall.dump') do
StackProf.run(mode: :cpu, out: '/tmp/stackprof-cpu.dump', interval: 500) do
# Couldn't we just load the ./wpscan here ?
# require_relative 'wpscan' doesn't work
WPScan::Scan.new do |s|
s.controllers <<
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