Phpmyadmin changes the SQL statement to base64 for Transmission

Source: Internet
Author: User

Because the dongle function is installed on the server, our direct SQL cannot be used. Next I will introduce you to phpmyadmin to change the SQL statement to base64 for transmission to solve this problem.

1. First modify libraries/header. inc. php

Paste the js base64 function to the 61st line

2. Modify js/SQL. js

Find $ ("# sqlqueryform. ajax"). live ("submit", function () {

Change to the following,

The Code is as follows: Copy code

$ ("# Sqlqueryform. ajax"). live ("submit", function (){
A. preventDefault ();
Var B = $ (this );
If (! CheckSqlQuery (B [0]) return false;
$ (". Error"). remove ();
Var c = PMA_ajaxShowMessage (), e = $ ("# sqlqueryresults ");
PMA_prepareForAjaxRequest (B );
$ ('# Sqlquery'). val (Base64.encode ($ (' # sqlquery'). val ()));
$. Post (B. attr ("action"), B. serialize (), function (d ){

 
3. Finally, modify import. php.


Insert 24th rows of the import. php file

The Code is as follows: Copy code


$ SQL _query = base64_decode ($ SQL _query );


OK. If you click SQL to input all the queries, it will be base64-encoded before transmission. You can bypass the interception of Security Defense software such as safedog.

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.