phpMyAdmin change SQL statement to Base64 transfer _php tutorial

Source: Internet
Author: User
Because the server installed a security dog this feature, our direct SQL is not available, let me give you a brief introduction of phpMyAdmin the SQL statement to Base64 transmission to solve the problem.

1. First modify the libraries/header.inc.php

Paste the JS Base64 function into line 61st

2. Then modify the Js/sql.js

Find $ ("#sqlqueryform. Ajax"). Live ("Submit", function (a) {This paragraph

Change to the following,

The code is as follows Copy Code

$ ("#sqlqueryform. Ajax"). Live ("Submit", function (a) {
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. Last modified import.php


import.php File line 24th insert

The code is as follows Copy Code


$sql _query=base64_decode ($sql _query);


OK now if the query by clicking on SQL input will be Base64 encoded before transmission, you can avoid the security of the dog and other security protection software interception

http://www.bkjia.com/PHPjc/632778.html www.bkjia.com true http://www.bkjia.com/PHPjc/632778.html techarticle because the server installed a safe dog this feature, our direct SQL is not available, the following I will introduce you to introduce phpMyAdmin SQL statements to Base64 transmission to solve ...

  • 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.