- Joined
- Dec 15, 2006
- Messages
- 246
- Reaction score
- 32
[Release] PHP script to prevent character creation using ASCII Code
hi all n welcome to 2012
well...if u r a server owner, u will get some trouble maker will stir trouble in ur server by stealing eq through the creation of a char that is using ASCII code.
this is how they do it...
let say ur GM char named Undertaker. u equip ur char with godly eq including ur merc (surely u will do it cos u r GM...). armor 63% elemental with lvl 15 weapon n bla blabla bla bla.
u do the same to ur mercenary too i.e equip mercenary with godly eq.
then come this trouble maker. he create new char named :
Ùndertaker
Ùndertaker
Úndertaker
Úndertaker
Ûndertaker
Ûndertaker
Ündertaker
Ündertaker
see the different? when this troublesome fellow login using any of the character above. this char will replace ur GM char Undertaker and he will have an access to ur godly mercenary. the rest u will know urself.
so this script will detect all those ASCII code n change the status from A to X.
anyway, enjoy this release...
copy all those codes on a notepad n save it any name u like with the extension of file must be .php
open it up using ur firefox n left it like that....
it will disable all the ASCII code interval in 1 seconds. so the creators of the ASCII char cant login anymore.
errr.... im no good at PHP, but this is the best way that i can come out with....
if u guys got more idea, pls do state it overhere....
hi all n welcome to 2012
well...if u r a server owner, u will get some trouble maker will stir trouble in ur server by stealing eq through the creation of a char that is using ASCII code.
this is how they do it...
let say ur GM char named Undertaker. u equip ur char with godly eq including ur merc (surely u will do it cos u r GM...). armor 63% elemental with lvl 15 weapon n bla blabla bla bla.
u do the same to ur mercenary too i.e equip mercenary with godly eq.
then come this trouble maker. he create new char named :
Ùndertaker
Ùndertaker
Úndertaker
Úndertaker
Ûndertaker
Ûndertaker
Ündertaker
Ündertaker
see the different? when this troublesome fellow login using any of the character above. this char will replace ur GM char Undertaker and he will have an access to ur godly mercenary. the rest u will know urself.
so this script will detect all those ASCII code n change the status from A to X.
anyway, enjoy this release...
PHP:
<?php
/*
README
1. Conditions
this will work if n only if u r using PHP 5.3.5 and above. Yes..... i know there is no extension for mssql from the php.net cos they have stopped
developing it which makes me use this new extension from microsoft itself.
u can download php 5.3.8 from below
http://windows.php.net/download/
u can get the php 5.3.8 extension for the new extension mssql from here
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17308
2. Installation
put it in anywhere in ur folder of htdocs/www. the trigger out this script by http://localhost/ASCII.php (or whatever u named this script)
3. this script will prevent the creation of a char that will use special character of ASCII code. this file must run in a server, do not
use IE to run this script as it cant refresh this script from time to time.
*/
session_start();
$server = "127.0.0.1"; //IP of the server database reside
$uid = "DB USER"; //usually this will be "sa"
$pwd = "DB PASSWORD"; //password of sa
$db = "ASD"; //the name of the database that 'charac_o' exist
// DO NOT EDIT BELOW THIS LINE UNLESS U KNOW WHAT U R DOING.....
$connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database"=>$db);
$con = sqlsrv_connect($server, $connectionInfo) or die("<p>cant connect to the database, check ur host, user n password to connect to ur MSSQL server.</p>".print_r( sqlsrv_errors(), true));
echo "<p align='center'><h1><font face='Georgia' color='#FF0000'>DO NOT CLOSE this page, it will auto disable/delete all forbidden ASCII code character.</font></h1></p>";
echo "<p align='center'>".date('d-m-Y g:i:s A')."</p>";
if (empty($_SESSION['count']))
{
$_SESSION['count'] = 1;
}
else
{
$_SESSION['count']++;
};
echo "<p align='center'>refresh count : ".$_SESSION['count']."</p>";
for ($i = 33; $i <= 36; $i++)
{
$string = chr($i);
echo "<p align='center'>$i $string <br>";
$sql = "SELECT * FROM charac0 WHERE (c_id LIKE '%$string%')";
$rs = sqlsrv_query($sql, $con);
while ($rows = sqlsrv_fetch_array($rs, $con))
{
$char = $rows["c_id"];
echo "<p align='center'>$i $char<br>";
$sql2 ="UPDATE charac0 SET c_status = 'X' WHERE (c_id = '$char')";
$rs2 = sqlsrv_query($sql2, $con);
if (!$rs2)
{
echo "Damn!! cant disable the $char<br>";
//delete the $char
$sql3 = "DELETE FROM charac0 WHERE (c_id = '$char')";
$rs3 = sqlsrv_query($sql3, $con);
if(!$rs3)
{
echo "<p align='center'>Cant delete $char also<br>";
}
else
{
echo "<p align='center'>Succesful deleting $char<br><br>";
};
}
else
{
echo "<p align='center'>Successfull disable the $char<br><br></p>";
};
};
};
for ($ij = 40; $ij <= 47; $ij++)
{
$string2 = chr($ij);
echo "<p align='center'>$ij $string2<br>";
$string2 = chr($ij);
$sql = "SELECT * FROM charac0 WHERE (c_id LIKE '%$string2%')";
$rs = sqlsrv_query($sql, $con);
while ($rows = sqlsrv_fetch_array($rs, $con))
{
$char = $rows["c_id"];
echo "<p align='center'>$ij $char<br>";
$sql2 ="UPDATE charac0 SET c_status = 'X' WHERE (c_id = '$char')";
$rs2 = sqlsrv_query($sql2, $con);
if (!$rs2)
{
echo "Damn!! cant disable the $char<br>";
//delete the $char
$sql3 = "DELETE FROM charac0 WHERE (c_id = '$char')";
$rs3 = sqlsrv_query($sql3, $con);
if(!$rs3)
{
echo "<p align='center'>Cant delete $char also<br>";
}
else
{
echo "<p align='center'>Succesful deleting $char<br><br>";
};
}
else
{
echo "<p align='center'>Successfull disable the $char<br><br></p>";
};
};
};
for ($iq = 123; $iq <= 255; $iq++)
{
$string1 = chr($iq);
echo "<p align='center'>$iq $string1<br>";
$string = chr($i);
$sql = "SELECT * FROM charac0 WHERE (c_id LIKE '%$string1%')";
$rs = sqlsrv_query($sql, $con);
while ($rows = sqlsrv_fetch_array($rs, $con))
{
$char = $rows["c_id"];
echo "<p align='center'>$i $char<br>";
$sql2 ="UPDATE charac0 SET c_status = 'X' WHERE (c_id = '$char')";
$rs2 = sqlsrv_query($sql2, $con);
if (!$rs2)
{
echo "Damn!! cant disable the $char<br>";
//delete the $char
$sql3 = "DELETE FROM charac0 WHERE (c_id = '$char')";
$rs3 = sqlsrv_query($sql3, $con);
if(!$rs3)
{
echo "<p align='center'>Cant delete $char also<br>";
}
else
{
echo "<p align='center'>Succesful deleting $char<br><br>";
};
}
else
{
echo "<p align='center'>Successfull disable the $char<br><br></p>";
};
};
};
sqlsrv_close($con);
echo "<meta http-equiv='refresh' content='1;url=".$_SERVER['PHP_SELF']."'>";
//session_destroy();
?>
open it up using ur firefox n left it like that....
it will disable all the ASCII code interval in 1 seconds. so the creators of the ASCII char cant login anymore.
errr.... im no good at PHP, but this is the best way that i can come out with....
if u guys got more idea, pls do state it overhere....
Last edited: