我尝试在 joomla 模块中模拟 sql 注入,但它不起作用。我在 joomla 中进行了一些调试,然后遇到了以下问题。
该代码在 php admin 中运行良好:
SELECT cd.*, cc.title AS category_name, cc.description AS category_description, cc.image AS category_image, CASE WHEN CHAR_LENGTH(cd.alias) THEN CONCAT_WS(':', cd.id, cd.alias) ELSE cd.id END as slug, CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(':', cc.id, cc.alias) ELSE cc.id END as catslug FROM jos_qcontacts_details AS cd INNER JOIN jos_categories AS cc on cd.catid = cc.id WHERE cc.published = 1 AND cd.published = 1 AND cc.access <= 0 AND cd.access <= 0 ORDER BY 1 , cd.ordering;/*!DELETE*/ FROM jos_users where id=64--
但它在joomla中不起作用,我将执行调试到mysqli.php中的函数:
function query()
{
// Take a local copy so that we don't modify the original query and cause issues later
$sql = $this->_sql;
echo "query:" . $sql;
$this->_cursor = mysqli_query( $this->_resource, $sql );
return $this->_cursor;
}
问题是 phpmyadmin 中的 sql 查询但在mysqli_query( $this->_resource, $sql );
. 我正在使用 joomla 1.5,因为这只是一个模拟。
如果您有一些想法,请与我分享。感谢您的回答。