Просмотр файла index.php

Размер файла: 4.07Kb
<?php 
#__________________________________________________________________
#
#              Автор скрипта:    Mackler aka Intell
#                     e-mail:    [email protected]
#                        ICQ:    531710
#                       site:    http://mackler.info
#__________________________________________________________________
  
error_reporting (E_ALL);   
@set_time_limit(0);   
ini_set ('max_execution_time', "0");   
require_once('WebIcqLite.class.php'); 
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>* * *</title>
</head>
<body>
';
echo '<table align="center" width=300 border=2 cellpadding=1 cellspacing=1 bgcolor="#dddddd">
<tr align="center"><th bgcolor="#0000a0"><font color="white"><h2><b><u>ICQ-Р±РѕС‚</u></b></h2></font></th></tr>
<tr align="center"><td>
<form action="index.php" method="POST">
UIN:<br><input type="text" name="tek_uin" maxlength=12><br>
Пароль:<br><input type="password" name="tek_pass" maxlength=20><br>
<input type="submit" name="action" value=" Рџ РЈ РЎ Рљ ">
</form></td></tr>
<tr align="center"><td>
<a href="index.php">на главную</a><br>
<a href="add.php">дополнить базу данных</a>
</td></tr>
<tr align="center"><td>
<b> <a href="http://mackler.info">&#169;</a> codihg by Scorpion & Mackler </b>
</td></tr>
</table>'; 
if (isset($action))
{//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
define('UIN', $_POST['tek_uin'] );  
define('PASSWORD', $_POST['tek_pass'] ); 
$icq = new WebIcqLite();   
if(!$icq->connect(UIN, PASSWORD))   
   {echo $icq->error;   
    exit();} 	
while($icq->is_connected())
  { $msg = $icq->read_message();   
    if (eregi('admin', $msg['message']))   
        {$pass=split(':',$msg['message']);   
         if(md5($pass[1])=='21232f297a57a5a743894a0e4a801fc3')   
           {define('ADMIN', $msg['from']);   
            $icq->send_message($msg['from'], 'Welcome admin');
		    }   
         else {$icq->send_message($msg['from'], 'sorry...' );}   
         }   
    if (preg_match('/^\S+@+\S+::\S+@+\S+::[^:]*::/', $msg['message']))   
        { $email=split('::',$msg['message']);   
          @mail($email[1], $email[2], $email[3], 'From:'.$email[0]);    
          $icq->send_message($msg['from'], 'Ваше письмо на '.$email[1].' отправлено.');   
         }   
else {
 
$message = strtolower($msg['message']);
if (eregi("#exit", $message))
        { $otvet="Пока *BYE*,но я ещё вернусь...";
		  $otvet=iconv('utf-8','Windows-1251',$otvet);
	      $icq->send_message($msg['from'],$otvet );
		  $icq->disconnect(); 
		  exit; }
else {  if (!file_exists("vopros.dat") || !file_exists("otvet.dat"))
            { fclose(@fopen("vopros.dat","a+")); 
	          @chmod("vopros.dat", 0777); 
	          fclose(@fopen("otvet.dat","a+"));
              @chmod("otvet.dat", 0777);
	         }
        $undata1 = file_get_contents("vopros.dat");
        $data1 = explode('|::|',$undata1);
        $undata2 = file_get_contents("otvet.dat");
        $data2 = explode('|::|',$undata2);
        $i =0;
        while (isset($data1[$i]) && $data1[$i] !="")
             { $data1[$i]=iconv('utf-8','Windows-1251',$data1[$i]);
			   if (eregi($data1[$i],$message))
	              {$otvet=$data2[$i];
				   $otvet=iconv('utf-8','Windows-1251',$otvet);
				   $icq->send_message($msg['from'], $otvet); $ok ="yes";
			        break;}
		       $i++;
              }
        if ( !isset($ok) || $ok !="yes") 
	       { $otvet="Р?Р·РІРёРЅРё, СЏ РЅРµ РїРѕР№РјСѓ чё ты хочешь... *PARDON*";
		     $otvet=iconv('utf-8','Windows-1251',$otvet);
			 $icq->send_message($msg['from'],$otvet ); }
        else { unset($ok);}	
	 }
    }
/////////////////////////////////////////////////////////////////////////////////////////////////////////		 
    flush();   
    sleep(1);   
   }
}//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX   
echo '
</body>
</html>
';
?>