Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
wp /
vendor /
wp-cli /
entity-command /
src /
[ HOME SHELL ]
Name
Size
Permission
Action
WP_CLI
[ DIR ]
drwxr-xr-x
Comment_Command.php
18
KB
-rw-r--r--
Comment_Meta_Command.php
4.5
KB
-rw-r--r--
Menu_Command.php
4.55
KB
-rw-r--r--
Menu_Item_Command.php
14.4
KB
-rw-r--r--
Menu_Location_Command.php
3.95
KB
-rw-r--r--
Network_Meta_Command.php
349
B
-rw-r--r--
Network_Namespace.php
298
B
-rw-r--r--
Option_Command.php
19.75
KB
-rw-r--r--
Post_Command.php
30.78
KB
-rw-r--r--
Post_Meta_Command.php
6.03
KB
-rw-r--r--
Post_Term_Command.php
1.16
KB
-rw-r--r--
Post_Type_Command.php
6.23
KB
-rw-r--r--
Signup_Command.php
8.26
KB
-rw-r--r--
Site_Command.php
32.41
KB
-rw-r--r--
Site_Meta_Command.php
4.39
KB
-rw-r--r--
Site_Option_Command.php
9.81
KB
-rw-r--r--
Taxonomy_Command.php
7.52
KB
-rw-r--r--
Term_Command.php
19.27
KB
-rw-r--r--
Term_Meta_Command.php
4.39
KB
-rw-r--r--
User_Application_Password_Comm...
16.77
KB
-rw-r--r--
User_Command.php
40.19
KB
-rw-r--r--
User_Meta_Command.php
9.31
KB
-rw-r--r--
User_Session_Command.php
5.24
KB
-rw-r--r--
User_Term_Command.php
294
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : User_Session_Command.php
<?php use WP_CLI\Fetchers\User as UserFetcher; use WP_CLI\Formatter; use WP_CLI\Utils; /** * Destroys and lists a user's sessions. * * ## EXAMPLES * * # List a user's sessions. * $ wp user session list admin@example.com --format=csv * login_time,expiration_time,ip,ua * "2016-01-01 12:34:56","2016-02-01 12:34:56",127.0.0.1,"Mozilla/5.0..." * * # Destroy the most recent session of the given user. * $ wp user session destroy admin * Success: Destroyed session. 3 sessions remaining. * * @package wp-cli */ class User_Session_Command extends WP_CLI_Command { private $fields = [ 'token', 'login_time', 'expiration_time', 'ip', 'ua', ]; private $fetcher; public function __construct() { $this->fetcher = new UserFetcher(); } /** * Destroy a session for the given user. * * ## OPTIONS * * <user> * : User ID, user email, or user login. * * [<token>] * : The token of the session to destroy. Defaults to the most recently created session. * * [--all] * : Destroy all of the user's sessions. * * ## EXAMPLES * * # Destroy the most recent session of the given user. * $ wp user session destroy admin * Success: Destroyed session. 3 sessions remaining. * * # Destroy a specific session of the given user. * $ wp user session destroy admin e073ad8540a9c2... * Success: Destroyed session. 2 sessions remaining. * * # Destroy all the sessions of the given user. * $ wp user session destroy admin --all * Success: Destroyed all sessions. * * # Destroy all sessions for all users. * $ wp user list --field=ID | xargs -n 1 wp user session destroy --all * Success: Destroyed all sessions. * Success: Destroyed all sessions. */ public function destroy( $args, $assoc_args ) { $user = $this->fetcher->get_check( $args[0] ); $token = Utils\get_flag_value( $args, 1, null ); $all = Utils\get_flag_value( $assoc_args, 'all', false ); $manager = WP_Session_Tokens::get_instance( $user->ID ); if ( $token && $all ) { WP_CLI::error( 'The --all flag cannot be specified along with a session token.' ); } if ( $all ) { $manager->destroy_all(); WP_CLI::success( 'Destroyed all sessions.' ); return; } $sessions = $this->get_all_sessions( $manager ); if ( ! $token ) { if ( empty( $sessions ) ) { WP_CLI::success( 'No sessions to destroy.' ); } $last = end( $sessions ); $token = $last['token']; } if ( ! isset( $sessions[ $token ] ) ) { WP_CLI::error( 'Session not found.' ); } $this->destroy_session( $manager, $token ); $remaining = count( $manager->get_all() ); WP_CLI::success( "Destroyed session. {$remaining} remaining." ); } /** * List sessions for the given user. * * Note: The `token` field does not return the actual token, but a hash of * it. The real token is not persisted and can only be found in the * corresponding cookies on the client side. * * ## OPTIONS * * <user> * : User ID, user email, or user login. * * [--fields=<fields>] * : Limit the output to specific fields. * * [--format=<format>] * : Render output in a particular format. * --- * default: table * options: * - table * - csv * - json * - yaml * - count * - ids * --- * * ## AVAILABLE FIELDS * * These fields will be displayed by default for each session: * * * token * * login_time * * expiration_time * * ip * * ua * * These fields are optionally available: * * * expiration * * login * * ## EXAMPLES * * # List a user's sessions. * $ wp user session list admin@example.com --format=csv * login_time,expiration_time,ip,ua * "2016-01-01 12:34:56","2016-02-01 12:34:56",127.0.0.1,"Mozilla/5.0..." * * @subcommand list */ public function list_( $args, $assoc_args ) { $user = $this->fetcher->get_check( $args[0] ); $formatter = $this->get_formatter( $assoc_args ); $manager = WP_Session_Tokens::get_instance( $user->ID ); $sessions = $this->get_all_sessions( $manager ); if ( 'ids' === $formatter->format ) { echo implode( ' ', array_keys( $sessions ) ); } else { $formatter->display_items( $sessions ); } } protected function get_all_sessions( WP_Session_Tokens $manager ) { // Make the private session data accessible to WP-CLI $get_sessions = new ReflectionMethod( $manager, 'get_sessions' ); $get_sessions->setAccessible( true ); $sessions = $get_sessions->invoke( $manager ); array_walk( $sessions, function ( &$session, $token ) { $session['token'] = $token; $session['login_time'] = date( 'Y-m-d H:i:s', $session['login'] ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date $session['expiration_time'] = date( 'Y-m-d H:i:s', $session['expiration'] ); // phpcs:ignore WordPress.DateTime.RestrictedFunctions.date_date } ); return $sessions; } protected function destroy_session( WP_Session_Tokens $manager, $token ) { $update_session = new ReflectionMethod( $manager, 'update_session' ); $update_session->setAccessible( true ); return $update_session->invoke( $manager, $token, null ); } private function get_formatter( &$assoc_args ) { return new Formatter( $assoc_args, $this->fields ); } }
Close