
Plně dynamický bezpečnostní kód
Publikováno: Pondělí, 05.02. 2007 - 00:15:00 Téma: Vše co se nějak vztahuje k xxNuke
Dlouho jsem přemýšlel jak změnit aspoň trochu bezpečnostní kód. Říkal jsem si že by bylo hezké kdyby byl generovaný celý.
Po stovkách hodin strávených marnými pokusy a návratů zpět se konečně podařilo tak nějak funkční řešení. Vy tuto úpravu můžete mít za 5 minut.
Dokonce si ani nikdo nestěžoval že by to nepřečetl, tak Vám to můžu dát k dispozici.
Řešení je to stejné jako v systému United-Nuke a nepřináší žádné vyšší bezpečnostní opatření, jedná se opravdu jen a pouze o kosmetickou úpravu.
Úprava je opravdu jednoduchá, takže se domnívám, že není třeba dalšího dlouhého vysvětlování.
Nejprve je potřeba si ve složce includes/custom_files/ vytvořit soubor s názvem custom_mainfile.php.
Do něj pak vložte následující kód
{ Kód }:
<?php ######################################################################
#
# function gfx module v.1.0 for United-Nuke # (c)2005+ BLASSENweb # website http://blassenweb.net
#
###################################################################### switch($gfx) {
case "gfx":
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
$circles=4;
$width=100;
$height=20;
Header("Content-type: image/png");
$image = ImageCreate($width,$height);
$randomcolor = imagecolorallocate ($image , rand(128,255),rand(128,255),rand(128,255));
imagefilledellipse($image,rand(0,$width-10),rand(0,$height-3),rand(20,70),rand(20,70),$randomcolor);
for ($cnt=0; $cnt<12; $cnt++) {
$text_color = ImageColorAllocate($image, intval(rand(192,255)), intval(rand(192,255)), intval(rand(192,255)));
ImageArc($image,($cnt*8),10,intval(rand(15,30)),intval(rand(15,30)),0,360, $text_color);
}
for ($idx=0; $idx<24; $idx++) {
$text_color = ImageColorAllocate($image, intval(rand(0,128)), intval(rand(0,128)), intval(rand(0,128)));
$text_color1 = ImageColorAllocate($image, intval(rand(0,128)), intval(rand(0,128)), intval(rand(0,128)));
ImageString ($image, intval(rand(2,5)), 12+($idx*14), 2, substr($code,$idx,1), $text_color);
ImageString ($image, intval(rand(2,5)), 11+($idx*14), 2, substr($code,$idx,1), $text_color1);
}
ImagePNG($image, '', 100);
ImageDestroy($image);
die();
break; // LITTLE IMAGE case "gfx_little": $datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 3);
$circles=10;
$width=60;
$height=20;
Header("Content-type: image/png");
$image = ImageCreate($width,$height);
$randomcolor = imagecolorallocate ($image , rand(128,255),rand(128,255),rand(128,255));
imagefilledellipse($image,rand(0,$width-10),rand(0,$height-3),rand(20,70),rand(20,70),$randomcolor);
for ($cnt=0; $cnt<12; $cnt++) {
$text_color = ImageColorAllocate($image, intval(rand(192,255)), intval(rand(192,255)), intval(rand(192,255)));
ImageArc($image,($cnt*8),10,intval(rand(15,30)),intval(rand(15,30)),0,360, $text_color);
}
for ($idx=0; $idx<24; $idx++) {
$text_color = ImageColorAllocate($image, intval(rand(0,128)), intval(rand(0,128)), intval(rand(0,128)));
$text_color1 = ImageColorAllocate($image, intval(rand(0,128)), intval(rand(0,128)), intval(rand(0,128)));
ImageString ($image, intval(rand(2,5)), 12+($idx*14), 2, substr($code,$idx,1), $text_color);
ImageString ($image, intval(rand(2,5)), 11+($idx*14), 2, substr($code,$idx,1), $text_color1);
}
ImagePNG($image, '', 60);
ImageDestroy($image);
die();
break;
}
?>
Následně najděte v souboru mainfile.php řádek 1887 a vložte před něj /* ORIGINAL GFX CODE
{ Kód }:
/* ORIGINAL GFX CODE
switch($gfx) {
A nakonec na řádek před ?> vložte ORIGINAL GFX CODE END */
{ Kód }:
ORIGINAL GFX CODE END */
?>
No a to je vše, zase konec, uložte a mělo by to fungovat.
-- Autor: Blassen
|
|