
실수로 이것을 프로덕션 서버의 슈퍼 유저로 bash에 붙여넣었습니다.
지금은 손톱을 먹고 있어요.
각 줄을 살펴보았는데 대부분 구문 오류가 발생했습니다. 그런데 서버 OS를 손상시킬 수 있는 악한 것이 있는 걸까요? 아니면 파일? 또는 아무것도?
우분투 서버 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
(숨겨지지 않은) 파일이 있는 디렉토리에서 이런 일이 발생한 경우, 다음으로 시작하는 모든 줄은 *
디렉토리에 있는 (숨겨지지 않은) 파일 목록으로 확장되어 첫 번째 파일을 명령으로 실행하려고 시도합니다 . . .
에 있는 경우 PATH
실행을 시도합니다.그 파일; 실행 가능하지 않으면 오류가 발생합니다. .
에 이 없으면 PATH
해당 이름으로 명령을 실행하려고 시도합니다. 예를 들어, 현재 디렉터리에 파일이 포함되어 있는 경우가 드물지만
rm
romeo
sierra
tango
그런 다음
* The base configurations of the WordPress.
명령은 다음과 같이 확장됩니다.
rm romeo sierra tango The base configurations of the WordPress.
그런 일이 발생했다면 지금쯤 눈치채셨을 거라 생각합니다(그러나 echo *
첫 번째 파일이 유효한 명령인지 확인하려면 a를 수행하는 것이 좋습니다).
로 시작하는 줄에 대해서도 비슷한 우려가 있지만 /**
아마도 와 같은 것으로 확장되어 다음과 같은 /bin /dev /etc /home /lib …
결과가 나올 것입니다.
bash: /bin: is a directory
드물지만 이라는 쉘 변수가 있는 경우 table_prefix
에는
$table_prefix = 'wp_';
해당 변수를 확장하고 실행을 시도합니다. 정의되지 않은 경우 table_prefix
위의 명령은 명령으로 실행을 시도합니다 =
(그리고 내가 아는 표준 Unix 시스템에는 그러한 명령이 없습니다).
다른 어떤 것도 나에게 문제로 튀어나오지 않습니다.
1 라인에 unbalanced 와 같이 구문 오류를 일으키는 다른 항목이 없는 한 )
.