Last active
November 15, 2023 18:17
-
-
Save rohjay/2e4869480479cae7928c6e742515ad4b to your computer and use it in GitHub Desktop.
Hostile XMLRPC Responder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Hostile XMLRPC Responder | |
Plugin URI: https://kneejerk.dev | |
Description: A MUST use plugin designed to respond to XMLRPC requests with a little hostility =] | |
Version: 2.8.1 | |
Author: Ryan "Rohjay" Oeltjenbruns | |
Author URI: https://rohjay.one | |
Requires at least: 6.0 | |
Requires PHP: 8.0 | |
To install, simply drop this file in the wp-content/mu-plugins/ folder of your site! | |
*/ | |
if ( !defined('XMLRPC_REQUEST') || XMLRPC_REQUEST == false ) { | |
return; | |
} | |
// Ok - let's have some fun! | |
while ( ob_get_level() ) { | |
ob_end_flush(); | |
} | |
echo "Commencing hostile xmlrpc response... One second please!\n"; | |
$random_string = str_repeat(md5( rand(10000,99999) . microtime(true) ), 1000); | |
// Dump for 1m straight. Hey - I'm not a monster! | |
$end_time = time() + 60; | |
while ( true ) { | |
echo $random_string; // No line breaks. Initial tests indicate it crashes tabs 2x as fast! | |
if ( time() > $end_time ) { | |
break; | |
} | |
} | |
echo "\nHostile XMLRPC response complete. Have a good day."; | |
exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm thinking perhaps "a little hostility" is a sliiiiight understatement 🤔