Пара скриптов от gemaglabinа которые могут поменять ip адреса в логах пребывания в админ панели или полность очистить таблицу.
Скрипты берут информацию для коннекта из конфигурационных файлов форума,те кидать надо в корень сервера. нашел на http://netdefect.net/
Invision Power Board:
PHP код:
<FORM NAME=check METHOD=POST ACTION='?change'>
<TD>Change IP To</TD>
<TD><INPUT NAME=ip TYPE=text CLASS=text Value=></TD>
<TD WIDTH=10%><input class=text type=submit value='change ip'></TD>
</Form>
<FORM NAME=check METHOD=POST ACTION='?clean'>
<TD>Clean Logs</TD>
<TD WIDTH=10%><input class=text type=submit value='clean logs'></TD>
</Form>
<?php
if (isset($_GET['change']) || isset($_GET['clean']))
{
require_once('./conf_global.php');
$dbtype = $INFO ['sql_driver'];
$dbname = $INFO ['sql_database'];
$prefix = $INFO ['sql_tbl_prefix'];
$server = $INFO ['sql_host'];
$sqluser = $INFO ['sql_user'];
$sqlpass = $INFO ['sql_pass'];
$db = mysql_connect($server,$sqluser, $sqlpass);
if (!$db) die ("cannot connect to mysql host");
mysql_SELECT_db($dbname);
if (isset($_POST['ip']) && !empty($_POST['ip']))
{
$newip = $_POST['ip'];
$sql = 'UPDATE `'.$prefix.'admin_logs` SET `ip_address` = '.$newip;
$result = mysql_query ($sql);
if (!$result) die("cannot execute sql query ".mysql_error());
echo "all ip addresses were updated to $newip";
}
if (isset($_GET['clean']))
{
$sql = 'TRUNCATE TABLE `'.$prefix.'admin_logs`';
$result = mysql_query ($sql);
if (!$result) die("cannot execute sql query ".mysql_error());
echo "all ip addresses were destroyed";
}
}
?>
vBulletion Board:
PHP код:
<FORM NAME=check METHOD=POST ACTION='?change'>
<TD>Change IP To</TD>
<TD><INPUT NAME=ip TYPE=text CLASS=text Value=></TD>
<TD WIDTH=10%><input class=text type=submit value='change ip'></TD>
</Form>
<FORM NAME=check METHOD=POST ACTION='?clean'>
<TD>Clean Logs</TD>
<TD WIDTH=10%><input class=text type=submit value='clean logs'></TD>
</Form>
<?php
if (isset($_GET['change']) || isset($_GET['clean']))
{
require_once('./includes/config.php');
$dbtype = $config['Database']['dbtype'];
$dbname = $config['Database']['dbname'];
$prefix = $config['Database']['tableprefix'];
$server = $config['MasterServer']['servername'];
$port = $config['MasterServer']['port'];
$sqluser = $config['MasterServer']['username'];
$sqlpass = $config['MasterServer']['password'];
$db = mysql_connect($server,$sqluser, $sqlpass);
if (!$db) die ("cannot connect to mysql host");
mysql_SELECT_db($dbname);
if (isset($_POST['ip']) && !empty($_POST['ip']))
{
$newip = $_POST['ip'];
$sql = 'UPDATE `adminlog` SET `ipaddress` = '.$newip;
$result = mysql_query ($sql);
if (!$result) die("cannot execute sql query ".mysql_error());
echo "all ip addresses were updated to $newip";
}
if (isset($_GET['clean']))
{
$sql = 'TRUNCATE TABLE `adminlog`';
$result = mysql_query ($sql);
if (!$result) die("cannot execute sql query ".mysql_error());
echo "all ip addresses were destroyed";
}
}
?>