HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/grapossconnect/js/create_captcha_image.js
    var cd;

    jQuery(function(){
        CreateCaptcha();
    });

    // Create Captcha
    function CreateCaptcha() {
        //$('#InvalidCapthcaError').hide();
        var alpha = new Array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
                    
        var i;
        for (i = 0; i < 6; i++) {
            var a = alpha[Math.floor(Math.random() * alpha.length)];
            var b = alpha[Math.floor(Math.random() * alpha.length)];
            var c = alpha[Math.floor(Math.random() * alpha.length)];
            var d = alpha[Math.floor(Math.random() * alpha.length)];
            var e = alpha[Math.floor(Math.random() * alpha.length)];
            var f = alpha[Math.floor(Math.random() * alpha.length)];
        }

        cd = a + ' ' + b + ' ' + c + ' ' + d + ' ' + e + ' ' + f;
        jQuery('#CaptchaImageCode').empty().append('<canvas id="CapCode" class="capcode" width="130" height="40"></canvas>')
  
        var c = document.getElementById("CapCode"),
        ctx=c.getContext("2d"),
        x = c.width / 2,
        img = new Image();

        img.src = "https://pixelsharing.files.wordpress.com/2010/11/salvage-tileable-and-seamless-pattern.jpg";
        img.onload = function () {
            var pattern = ctx.createPattern(img, "repeat");
            ctx.fillStyle = pattern;
            ctx.fillRect(0, 0, c.width, c.height);
            ctx.font="18px Roboto Slab";
            ctx.fillStyle = '#ccc';
            ctx.textAlign = 'center';
            ctx.setTransform (1, -0.12, 0, 1, 0, 15);
            ctx.fillText(cd,x,16);
        };
    }


    // <input style="width: 60%;float: right;" type="text" placeholder="Enter Captcha" name="captcha" id="captcha" size="5" value="" />
    // <span style="border: 1px solid transparent !important;">
    //     <div id="CaptchaImageCode" class="CaptchaImageCode">
    //     <canvas id="CapCode" class="capcode" width="300" height="80" style="margin-right: 10px;"></canvas>
    //     </div>
    // </span> 
    // <i class="fas fa-sync" onclick='CreateCaptcha()' style="margin-right: 57px;"></i>