美文网首页我爱编程
中国菜刀连接数据库格式

中国菜刀连接数据库格式

作者: yangc随想 | 来源:发表于2018-04-16 19:12 被阅读0次

这个东西学了忘,忘了学,直接在这里做一下笔记。
假设拿到了一个网站,并且挂马,用中国菜刀连接上。


image.png

一般情况下配置文件(config.php)中可能保存连接数据库的用户名和密码 ,比如这里的改文件就是:

<?php
error_reporting(0);
session_start();
$servername = "localhost";
$username = "ctf";
$password = "ctfctfctf";
$database = "ctf";
$conn = mysql_connect($servername,$username,$password) or die(" connect to mysql error");
mysql_select_db($database);
?>

那么用中国菜刀连接网站数据库的格式就是

<T>数据库类型</T>
<H>服务名称</H>
<U>用户名</U>
<P>密码</P>

换做这道题就是:

<T>MYSQL</T>
<H>localhost</H>
<U>ctf</U>
<P>ctfctfctf</P>

相关文章

网友评论

    本文标题:中国菜刀连接数据库格式

    本文链接:https://www.haomeiwen.com/subject/jwoekftx.html