
08.10.2011, 17:01
|
|
Познающий
Регистрация: 06.03.2007
Сообщений: 59
С нами:
10095779
Репутация:
137
|
|
VentaCMS [SQL-inj]
search.php
SQL-inj::[POST]
Сообщение от None
...
Поиск услуг по городам
">
">
">
str; ?>" id="text" />
-->
Ваш город
$city) { ?>
">
...
mod_search.php
Сообщение от None
...
if($_POST['action']=="search")
{
$error = "";
if((strlen(trim($_POST['str']))city_id && !$request->cat_id) $error['str'] = "Вы указали неправильные параметры поиска";
if(!$error)
{
$offerObj = new absOffers();
$search['offers'] = $offerObj ->siteSearch($request->str, $request->city_id, $request->cat_id); // search in offers
$send = true;
}
}
...
absOffers.php
Сообщение от None
...
function siteSearch ($str = null, $city = null, $cat = null) // поиск по заголовку и тексту страниц сайта
{
global $mysql;
$select = new SelectFromDB($mysql, __LINE__);
$select -> addWhere("active='1'");
if($city) $select -> addWhere("city_id='$city'");
if($cat) $select -> addWhere("cat_id='$cat'");
// if($str) $select -> addWhere("MATCH (caption, description) AGAINST ('".trim($str)."' IN BOOLEAN MODE)");
if($str) $select -> addWhere("(caption LIKE '%".trim($str)."%' OR description LIKE '%".trim($str)."%')");
$select
-> addFild("{$this->table}.*")
-> addFild("(SELECT COUNT( item_id ) FROM mod_offer_comments WHERE active = '1' AND mod_offers.id = item_id) AS comments"); // Вложенный подзапрос количество комментов
return $select -> addFrom($this->table) -> addOrder($this->order, DESC) -> queryDB();
}
...
exploit:
Сообщение от None
...
Поиск услуг по городам
...
Пример уязвимого сайта:
Сообщение от None
_http://spravim.ru/
Сайт производителя:
Сообщение от None
_http://www.promo-venta.ru/
|
|
|