Path: blob/master/modules/misc/wordpress/wordpress_command.rb
1154 views
#1# Copyright (c) Browser Exploitation Framework (BeEF) - https://beefproject.com2# See the file 'doc/COPYING' for copying permission3#4# Author Erwan LR (@erwan_lr | WPScanTeam) - https://wpscan.org/5#67require 'securerandom'89class WordPressCommand < BeEF::Core::Command10def pre_send11BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind('/modules/misc/wordpress/wp.js', '/wp', 'js')12end1314# If we could retrive the hooked URL, we could try to determine the wp_path to be set below15def self.options16[17{ 'name' => 'wp_path', 'ui_label' => 'WordPress Path', 'value' => '/' }18]19end2021# This one is triggered each time a beef.net.send is called22def post_execute23BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind('wp.js')2425return unless @datastore['result']2627save({ 'result' => @datastore['result'] })28end29end303132