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.47
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 /
features /
[ HOME SHELL ]
Name
Size
Permission
Action
aliases.feature
15.82
KB
-rw-r--r--
bootstrap.feature
14.43
KB
-rw-r--r--
class-wp-cli.feature
570
B
-rw-r--r--
cli-bash-completion.feature
7.13
KB
-rw-r--r--
cli-cache.feature
2.12
KB
-rw-r--r--
cli-check-update.feature
10.09
KB
-rw-r--r--
cli-info.feature
1.25
KB
-rw-r--r--
cli.feature
2.52
KB
-rw-r--r--
command.feature
37.85
KB
-rw-r--r--
config.feature
18.61
KB
-rw-r--r--
context.feature
5.68
KB
-rw-r--r--
flags.feature
9.63
KB
-rw-r--r--
formatter.feature
5.73
KB
-rw-r--r--
framework.feature
11.22
KB
-rw-r--r--
help.feature
33.66
KB
-rw-r--r--
hook.feature
6.09
KB
-rw-r--r--
prompt.feature
5.14
KB
-rw-r--r--
requests.feature
3.62
KB
-rw-r--r--
runcommand.feature
10.41
KB
-rw-r--r--
runner.feature
2.6
KB
-rw-r--r--
skip-plugins.feature
3.35
KB
-rw-r--r--
skip-themes.feature
5.52
KB
-rw-r--r--
steps.feature
1.78
KB
-rw-r--r--
utils-wp.feature
22.54
KB
-rw-r--r--
utils.feature
6.71
KB
-rw-r--r--
validation.feature
1.16
KB
-rw-r--r--
wp-config.feature
1.11
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : flags.feature
Feature: Global flags @require-wp-5.5 Scenario: Setting the URL Given a WP installation When I run `wp --url=localhost:8001 eval 'echo json_encode( $_SERVER );'` Then STDOUT should be JSON containing: """ { "HTTP_HOST": "localhost:8001", "SERVER_NAME": "localhost", "SERVER_PORT": 8001 } """ @less-than-wp-5.5 Scenario: Setting the URL Given a WP installation When I run `wp --url=localhost:8001 eval 'echo json_encode( $_SERVER );'` Then STDOUT should be JSON containing: """ { "HTTP_HOST": "localhost:8001", "SERVER_NAME": "localhost", "SERVER_PORT": "8001" } """ Scenario: Setting the URL on multisite Given a WP multisite installation And I run `wp site create --slug=foo` When I run `wp --url=example.com/foo option get home` Then STDOUT should contain: """ example.com/foo """ @require-wp-3.9 Scenario: Invalid URL Given a WP multisite installation When I try `wp post list --url=invalid.example.com` Then STDERR should be: """ Error: Site 'invalid.example.com' not found. Verify `--url=<url>` matches an existing site. """ Scenario: Quiet run Given a WP installation When I try `wp non-existing-command --quiet` Then the return code should be 1 And STDERR should be: """ Error: 'non-existing-command' is not a registered wp command. See 'wp help' for available commands. """ @less-than-php-8 Scenario: Debug run Given a WP installation When I try `wp eval 'echo CONST_WITHOUT_QUOTES;'` Then STDOUT should be: """ CONST_WITHOUT_QUOTES """ And STDERR should contain: """ Use of undefined constant CONST_WITHOUT_QUOTES """ And the return code should be 0 When I try `wp eval 'echo CONST_WITHOUT_QUOTES;' --debug` Then the return code should be 0 And STDOUT should be: """ CONST_WITHOUT_QUOTES """ And STDERR should contain: """ Use of undefined constant CONST_WITHOUT_QUOTES """ Scenario: Setting the WP user Given a WP installation When I run `wp eval 'var_export( is_user_logged_in() );'` Then STDOUT should be: """ false """ And STDERR should be empty When I run `wp --user=admin eval 'echo wp_get_current_user()->user_login;'` Then STDOUT should be: """ admin """ And STDERR should be empty When I run `wp --user=admin@example.com eval 'echo wp_get_current_user()->user_login;'` Then STDOUT should be: """ admin """ And STDERR should be empty When I try `wp --user=non-existing-user eval 'echo wp_get_current_user()->user_login;'` Then the return code should be 1 And STDERR should be: """ Error: Invalid user ID, email or login: 'non-existing-user' """ Scenario: Warn when provided user is ambiguous Given a WP installation When I run `wp --user=1 eval 'echo wp_get_current_user()->user_email;'` Then STDOUT should be: """ admin@example.com """ And STDERR should be empty When I run `wp user create 1 user1@example.com` Then STDOUT should contain: """ Success: """ When I try `wp --user=1 eval 'echo wp_get_current_user()->user_email;'` Then STDOUT should be: """ admin@example.com """ And STDERR should be: """ Warning: Ambiguous user match detected (both ID and user_login exist for identifier '1'). WP-CLI will default to the ID, but you can force user_login instead with WP_CLI_FORCE_USER_LOGIN=1. """ When I run `WP_CLI_FORCE_USER_LOGIN=1 wp --user=1 eval 'echo wp_get_current_user()->user_email;'` Then STDOUT should be: """ user1@example.com """ And STDERR should be empty When I run `wp --user=user1@example.com eval 'echo wp_get_current_user()->user_email;'` Then STDOUT should be: """ user1@example.com """ And STDERR should be empty When I try `WP_CLI_FORCE_USER_LOGIN=1 wp --user=user1@example.com eval 'echo wp_get_current_user()->user_email;'` Then STDERR should be: """ Error: Invalid user login: 'user1@example.com' """ Scenario: Using a custom logger Given an empty directory And a custom-logger.php file: """ <?php class Dummy_Logger { function __call( $method, $args ) { echo "log: called '$method' method"; } } WP_CLI::set_logger( new Dummy_Logger ); """ When I try `wp --require=custom-logger.php is-installed` Then STDOUT should contain: """ log: called 'error' method """ And STDERR should be empty And the return code should be 1 Scenario: Using --require Given an empty directory And a custom-cmd.php file: """ <?php /** * @when before_wp_load */ class Test_Command extends WP_CLI_Command { function req( $args, $assoc_args ) { WP_CLI::line( $args[0] ); } } WP_CLI::add_command( 'test', 'Test_Command' ); """ And a foo.php file: """ <?php echo basename(__FILE__) . "\n"; """ And a bar.php file: """ <?php echo basename(__FILE__) . "\n"; """ And a wp-cli.yml file: """ require: - foo.php - bar.php """ And a wp-cli2.yml file: """ require: custom-cmd.php """ When I run `wp --require=custom-cmd.php test req 'This is a custom command.'` Then STDOUT should be: """ foo.php bar.php This is a custom command. """ When I run `WP_CLI_CONFIG_PATH=wp-cli2.yml wp test req 'This is a custom command.'` Then STDOUT should contain: """ This is a custom command. """ Scenario: Using --require with globs Given an empty directory And a foober/foo.php file: """ <?php echo basename(__FILE__) . "\n"; """ And a foober/bar.php file: """ <?php echo basename(__FILE__) . "\n"; """ And a doobie/doo.php file: """ <?php echo basename(__FILE__) . "\n"; """ And a wp-cli.yml file: """ require: foober/*.php """ When I run `wp` Then STDOUT should contain: """ bar.php foo.php """ When I run `wp --require=doobie/*.php` Then STDOUT should contain: """ doo.php """ Scenario: Enabling/disabling color Given a WP installation When I try `wp --no-color non-existent-command` Then STDERR should be: """ Error: 'non-existent-command' is not a registered wp command. See 'wp help' for available commands. """ When I try `wp --color non-existent-command` Then STDERR should strictly contain: """ [31;1mError: """ Scenario: Use `WP_CLI_STRICT_ARGS_MODE` to distinguish between global and local args Given an empty directory And a cmd.php file: """ <?php /** * @when before_wp_load * * [--url=<url>] * : URL passed to the callback. */ $cmd_test = function( $args, $assoc_args ) { $url = WP_CLI::get_runner()->config['url'] ? ' ' . WP_CLI::get_runner()->config['url'] : ''; WP_CLI::log( 'global:' . $url ); $url = isset( $assoc_args['url'] ) ? ' ' . $assoc_args['url'] : ''; WP_CLI::log( 'local:' . $url ); }; WP_CLI::add_command( 'cmd-test', $cmd_test ); """ And a wp-cli.yml file: """ require: - cmd.php """ When I run `wp cmd-test --url=foo.dev` Then STDOUT should be: """ global: foo.dev local: """ When I run `WP_CLI_STRICT_ARGS_MODE=1 wp cmd-test --url=foo.dev` Then STDOUT should be: """ global: local: foo.dev """ When I run `WP_CLI_STRICT_ARGS_MODE=1 wp --url=bar.dev cmd-test --url=foo.dev` Then STDOUT should be: """ global: bar.dev local: foo.dev """ Scenario: Using --http=<url> requires wp-cli/restful Given an empty directory When I try `wp --http=foo.dev` Then STDERR should be: """ Error: RESTful WP-CLI needs to be installed. Try 'wp package install wp-cli/restful'. """ Scenario: Strict args mode should be passed on to ssh When I try `WP_CLI_STRICT_ARGS_MODE=1 wp --debug --ssh=/ --version` Then STDERR should contain: """ Running SSH command: ssh -T -vvv '' 'WP_CLI_STRICT_ARGS_MODE=1 wp """ Scenario: SSH flag should support changing directories When I try `wp --debug --ssh=wordpress:/my/path --version` Then STDERR should contain: """ Running SSH command: ssh -T -vvv 'wordpress' 'cd '\''/my/path'\''; wp """ Scenario: SSH flag should support Docker When I try `WP_CLI_DOCKER_NO_INTERACTIVE=1 wp --debug --ssh=docker:user@wordpress --version` Then STDERR should contain: """ Running SSH command: docker exec --user 'user' 'wordpress' sh -c """ Scenario: Customize config-spec with WP_CLI_CONFIG_SPEC_FILTER_CALLBACK Given a WP installation And a wp-cli-early-require.php file: """ <?php function wp_cli_remove_user_arg( $spec ) { unset( $spec['user'] ); return $spec; } define( 'WP_CLI_CONFIG_SPEC_FILTER_CALLBACK', 'wp_cli_remove_user_arg' ); """ When I run `WP_CLI_EARLY_REQUIRE=wp-cli-early-require.php wp help` Then STDOUT should not contain: """ --user=<id|login|email> """ When I run `wp help` Then STDOUT should contain: """ --user=<id|login|email> """
Close