daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Mar 25th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if($_GET['acc']=='validate_cert_key_fuct'){
  2.     if(file_exists('/etc/pki/tls/certs/'.trim($_POST['certificate']))){
  3.         $certificate=shell_exec('cat /etc/pki/tls/certs/'.trim($_POST['certificate']));
  4.         $buscar=array('.cert','.pem',',crt');
  5.         $domain=str_replace($buscar,'',$_POST['certificate']);
  6.         if(file_exists('/etc/pki/tls/private/'.$domain.'.key')){
  7.             $key=shell_exec('cat /etc/pki/tls/private/'.$domain.'.key');
  8.             if(openssl_x509_check_private_key($certificate, $key)==false){
  9.                 echo 0;
  10.                 die;
  11.             }else{
  12.                 echo 1;
  13.                 die;
  14.             }
  15.         }else{
  16.             echo 'notexist';
  17.             die;
  18.         }
  19.     }else{
  20.         echo 'notexist';
  21.         die;
  22.     }
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top