Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.81 KB | None | 0 0
  1.  
  2. <?php
  3.  
  4.   require "mysql.php";
  5.  
  6.  
  7.   $apk_name = ['ClockPackage.apk'] ['name'];
  8.  
  9.   $odex_name = ['ClockPackage.odex'] ['name'];
  10.  
  11.   $framework_name = ['framework'] ['name'];
  12.  
  13.  
  14.   $directory_apk = 'requests/$name/apk';
  15.  
  16.   $directory_odex = 'requests/$name/odex';
  17.  
  18.   $directory_framework = 'requests/$name/framework';
  19.  
  20.  
  21.   $target_apk = $directory_apk.$apk_name;
  22.  
  23.   $target_odex = $directory_odex.$odex_name;
  24.  
  25.   $target_framework = $directory_framework.$framework_name;
  26.  
  27.  
  28.  
  29.  
  30.  
  31.   if (isset($_POST['request'])) {
  32.  
  33.      function CheckCaptcha($userResponse) {
  34.  
  35.         $fields_string = '';
  36.  
  37.         $fields = array(
  38.  
  39.             'secret' => 'private key',
  40.  
  41.             'response' => $userResponse
  42.  
  43.         );
  44.  
  45.         foreach($fields as $key=>$value)
  46.  
  47.         $fields_string .= $key . '=' . $value . '&';
  48.  
  49.         $fields_string = rtrim($fields_string, '&');
  50.  
  51.         $ch = curl_init();
  52.  
  53.         curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify');
  54.  
  55.         curl_setopt($ch, CURLOPT_POST, count($fields));
  56.  
  57.         curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
  58.  
  59.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, True);
  60.  
  61.         $res = curl_exec($ch);
  62.  
  63.         curl_close($ch);
  64.  
  65.         return json_decode($res, true);
  66.  
  67.     }
  68.  
  69.     // Call the function CheckCaptcha
  70.  
  71.     $result = CheckCaptcha($_POST['g-recaptcha-response']);
  72.  
  73.     if (empty($_POST['name'])) {
  74.  
  75.       echo "<h5>Please enter a name</h5>";
  76.  
  77.     }
  78.  
  79.     else {
  80.  
  81.     $name = $_POST ['name'];
  82.  
  83.   }
  84.  
  85.       if (empty($_POST['email'])) {
  86.  
  87.         echo "<h5>Please enter your email</h5>";
  88.  
  89.       }
  90.  
  91.       else {
  92.  
  93.       $email = $_POST ['email'];
  94.  
  95.     }
  96.  
  97.       if (empty($_POST['ClockPackage.apk'])) {
  98.  
  99.         echo "<h5>Please upload your ClockPackage.apk to continue</h5>";
  100.  
  101.         }
  102.  
  103.         else {
  104.  
  105.       $clockapk = $_POST ['ClockPackage.apk'];
  106.  
  107.     }
  108.  
  109.           if (empty($_POST['ClockPackage.odex'])) {
  110.  
  111.         echo "<h5>Please upload your ClockPackage.odex to continue</h5>";
  112.  
  113.           }
  114.  
  115.           else {
  116.  
  117.       $clockodex = $_POST ['ClockPackage.odex'];
  118.  
  119.     }
  120.  
  121.         if (empty($_POST['framework'])) {
  122.  
  123.           echo "<h5>Please upload your framework to continue</h5>";
  124.  
  125.             }
  126.  
  127.             else {
  128.  
  129.       $framework = $_POST ['framework'];
  130.  
  131.     }
  132.  
  133.               if (empty($_POST['do_you_know_it'])) {
  134.  
  135.             echo "<h5>Please chose a option</h5>";
  136.  
  137.               }
  138.  
  139.         else {
  140.  
  141.           $you_know_it = $_POST ['do_you_know_it'];
  142.  
  143.         }
  144.  
  145.         if ($result['success']) {
  146.  
  147.         //If the user has checked the Captcha box
  148.  
  149.         echo "<h5>Captcha verified Successfully</h5>";
  150.  
  151.  
  152.     } else {
  153.  
  154.         // If the CAPTCHA box wasn't checked
  155.  
  156.        echo "<h5>you must verifay chaptcha</h5>";
  157.  
  158.     }
  159.  
  160.   }
  161.  
  162. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement