Server IP : 172.67.216.182 / Your IP : 162.158.170.219 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/wwwroot/lapma.in/airpay_php_v3/ |
Upload File : |
<?php Class Checksum { public static function calculateChecksum($data, $secret_key) { $checksum = md5($data.$secret_key); return $checksum; } public static function encrypt($data, $salt) { // Build a 256-bit $key which is a SHA256 hash of $salt and $password. $key = hash('SHA256', $salt.'@'.$data); return $key; } public static function encryptSha256($data) { $key = hash('SHA256', $data); return $key; } public static function calculateChecksumSha256($data, $salt) { // print($data); // exit; $checksum = hash('SHA256', $salt.'@'.$data); return $checksum; } /* public static function getAllParams() { //ksort($_POST); $all = ''; $except_list=array('checksum','privatekey','mercid','message'); foreach($_POST as $key => $value) { if(!in_array($key,$except_list)) { $all .= "'"; $_POST[key] = Checksum::sanitizedParam($value); } } } */ public static function outputForm($checksum) { //ksort($_POST); foreach($_POST as $key => $value) { echo '<input type="hidden" name="'.$key.'" value="'.$value.'" />'."\n"; } echo '<input type="hidden" name="checksum" value="'.$checksum.'" />'."\n"; } public static function verifyChecksum($checksum, $all, $secret) { $cal_checksum = Checksum::calculateChecksum($secret, $all); $bool = 0; if($checksum == $cal_checksum) { $bool = 1; } return $bool; } /* public static function sanitizedParam($param) { $pattern[0] = "%\{%"; $pattern[1] = "%\}%"; $pattern[2] = "%<%"; $pattern[3] = "%>%"; $pattern[4] = "%`%"; $pattern[5] = "%!%"; $pattern[6] = "%\[%"; $pattern[7] = "%\]%"; $pattern[8] = "%\*%"; $pattern[9] = "%&%"; $pattern[10] = "%\\$%"; $pattern[11] = "%\%%"; $pattern[12] = "%\^%"; $pattern[13] = "%=%"; $pattern[14] = "%\+%"; $pattern[15] = "%\|%"; $pattern[16] = "%\\\%"; $pattern[17] = "%:%"; $pattern[18] = "%'%"; $pattern[19] = "%\"%"; $pattern[21] = "%~%"; $sanitizedParam = preg_replace($pattern, "", $param); return $sanitizedParam; } public static function sanitizedURL($param) { $pattern[0] = "%,%"; $pattern[1] = "%\(%"; $pattern[2] = "%\)%"; $pattern[3] = "%\{%"; $pattern[4] = "%\}%"; $pattern[5] = "%<%"; $pattern[6] = "%>%"; $pattern[7] = "%`%"; $pattern[8] = "%!%"; $pattern[9] = "%\\$%"; $pattern[10] = "%\%%"; $pattern[11] = "%\^%"; $pattern[12] = "%\+%"; $pattern[13] = "%\|%"; $pattern[14] = "%\\\%"; $pattern[15] = "%'%"; $pattern[16] = "%\"%"; $pattern[17] = "%;%"; $pattern[18] = "%~%"; $pattern[19] = "%\[%"; $pattern[20] = "%\]%"; $pattern[21] = "%\*%"; $sanitizedParam = preg_replace($pattern, "", $param); return $sanitizedParam; } */ }