ACC SHELL

Path : /srv/www/vhosts/csmap/assets/php/
File Upload :
Current File : //srv/www/vhosts/csmap/assets/php/show_code.php

<?php
    error_reporting(1);
    session_start();
    $imgcodejn9freeside = rand(10000,99999).'A';
    $_SESSION['imgcodejn9freeside'] = $imgcodejn9freeside;
    
	header("content-Type: image/png");
	$thumb = imagecreate(100, 60);
    $colors[0] = array(R=>0, G=>0, B=>0);
    $colors[1] = array(R=>108, G=>40, B=>69); 
    $colors[2] = array(R=>87, G=>46, B=>103);
    $colors[3] = array(R=>46, G=>47, B=>103);
    $colors[4] = array(R=>48, G=>83, B=>101);
    $colors[5] = array(R=>49, G=>100, B=>64);
    $colors[6] = array(R=>99, G=>60, B=>50);
    $colors[7] = array(R=>130, G=>130, B=>130);

    $bgcolors[0] = array(R=>255, G=>255, B=>255);
    $bgcolors[1] = array(R=>248, G=>254, B=>133); 
    $bgcolors[2] = array(R=>253, G=>202, B=>134);
    $bgcolors[3] = array(R=>188, G=>254, B=>215);
    $bgcolors[4] = array(R=>188, G=>254, B=>252);
    $bgcolors[5] = array(R=>199, G=>209, B=>254);
    $bgcolors[6] = array(R=>254, G=>199, B=>213);

    $left = rand(1,40);
    $bgbarva = rand(0,6);
	$bg = imagecolorallocate($thumb, $bgcolors[$bgbarva][R], $bgcolors[$bgbarva][G], $bgcolors[$bgbarva][B]);
    $text_color = imagecolorallocate($thumb, $colors[$barva][R], $colors[$barva][G], $colors[$barva][B]);
    $code = (string)$imgcodejn9freeside;

    $nasobek = array(0=>1, 1=>-1);
    for ($i=1;$i<=40;$i++)
    {
        $x1 = rand(0,100);
        $y1 = rand(0,60);
        $x2 = rand(1,10);
        $y2 = rand(1,10);
        $zap1 = rand(0,1);
        $zap2 = rand(0,1);
        $barva = rand(7,7);
	    $text_color = imagecolorallocate($thumb, $colors[$barva][R], $colors[$barva][G], $colors[$barva][B]);
        imageline ($thumb, $x1, $y1, $x1+$nasobek[$zap1]*$x2, $y1+$nasobek[$zap2]*$y2, $text_color );
    }
        
    for ($i=0;$i<=strlen((string)$imgcodejn9freeside);$i++)
    {
        $barva = rand(0,0);
	    $text_color = imagecolorallocate($thumb, $colors[$barva][R], $colors[$barva][G], $colors[$barva][B]);
	    $size = rand(7,8);
        imagechar($thumb, $size, $left+$i*10, 10+rand(1,7)*3, $code[$i], $text_color);
    }
    
	imagepng($thumb);
	imagedestroy($thumb);
?>

ACC SHELL 2018