我不小心将其作为生产服务器上的超级用户粘贴到 bash 中。
现在我正在吃指甲。
我查看了每一行,大多数都产生语法错误。但是有什么邪恶的东西可能会损坏服务器操作系统吗?或文件?或者什么?
这是 ubuntu 服务器 14.04。
我如何诊断运行了哪些命令以及它们做了什么?
历史是显而易见的地方,但它没有显示运行过什么以及由哪个程序运行。有没有办法诊断这种愚蠢行为?
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
* installation. You don't have to use the web site, you can just copy this file
* to "wp-config.php" and fill in the values.
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '');
/** MySQL database username */
define('DB_USER', '');
/** MySQL database password */
define('DB_PASSWORD', '');
/** MySQL hostname */
define('DB_HOST', 'localhost');
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define('AUTH_KEY', 'N%___i}IF<(o&h<;|_/0g-OYxEeU)Pq_JM@x!`S^-*[*$$#`|Lp|4R|');
define('SECURE_AUTH_KEY', '.JyD{}94,kBQB`>&>)sT@4bMl|}SxJQ~ 1NUw^RdQ;QrLVC#].#64k');
define('LOGGED_IN_KEY', '2ClY{7eA4933w3qEQ(L>o<{`WD|t-b4B<KW;psm6qa_Mmk.f~N1$]8');
define('NONCE_KEY', ' $QAiTez.wIq_},tNekyQYgU3:;>y-[LT-vR8X{r+kuG-t!C>');
define('AUTH_SALT', '!#0MnA@UTy]~CN#[Akn-2M<fEuGjSH,*Bu7B[!@@.owHb:G-_PXvP_');
define('SECURE_AUTH_SALT', '%DXWY0|+SkU%!aC.aXG#T{ |YZE|X.VyfVx8QW:bX+2sZ(7cw98i');
define('LOGGED_IN_SALT', '{d}Pn%i>?B &Q@#Dw+*Xal^eD`xK4wet8=k+F9Tr2}2H75.@+{g+)');
define('NONCE_SALT', ']3gOf&v-43GEe`hOqnu_1TwZeqU!ZIm-8}Lm1&0;pW7d`,4[QTT');
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each a unique
* prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*/
define('WP_DEBUG', false);
/* That's all, stop editing! Happy blogging. */
/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
答案1
如果这种情况发生在包含(非隐藏)文件的目录中,则以 开头的任何行都*
将扩展到该目录中的(非隐藏)文件列表,因此将尝试将第一个文件作为命令1执行。如果您.
有PATH
有,它会尝试执行那个文件;如果它不可执行,你只会得到一个错误。如果您.
的 中没有PATH
,它将尝试使用该名称执行命令。例如,万一您的当前目录包含以下文件
rm
romeo
sierra
tango
那么
* The base configurations of the WordPress.
命令将扩展为
rm romeo sierra tango The base configurations of the WordPress.
我希望您现在已经注意到是否发生了这种情况(但我建议您执行 aecho *
来查看第一个文件是否是有效的命令)。
对于以 开头的行也有类似的担忧/**
,但这可能会扩展到类似 的内容/bin /dev /etc /home /lib …
,这将导致
bash: /bin: is a directory
万一您有一个名为 的 shell 变量table_prefix
,那么
$table_prefix = 'wp_';
将扩展该变量并尝试执行它。如果table_prefix
没有定义,那么上面的命令将尝试=
作为命令执行(据我所知,标准 Unix 系统上没有这样的命令)。
没有什么其他事情对我来说是个问题。
1 除非该行中存在其他导致语法错误的内容,例如不平衡的)
.