Skip to content

Instantly share code, notes, and snippets.

@rohjay
Last active November 15, 2023 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohjay/2e4869480479cae7928c6e742515ad4b to your computer and use it in GitHub Desktop.
Save rohjay/2e4869480479cae7928c6e742515ad4b to your computer and use it in GitHub Desktop.
Hostile XMLRPC Responder
<?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();
@rohjay
Copy link
Author

rohjay commented Oct 3, 2023

I'm thinking perhaps "a little hostility" is a sliiiiight understatement 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment