Esempio n. 1
0
     case 'FunCaptcha':
         require_once "libs/funcaptcha.php";
         $funcaptcha = new FUNCAPTCHA();
         $data["captcha"] = $funcaptcha->getFunCaptcha($data["funcaptcha_public_key"]);
         if (array_key_exists('address', $_POST)) {
             $data['captcha_valid'] = $funcaptcha->checkResult($data["funcaptcha_private_key"]);
         }
         break;
 }
 $data['captcha_info'] = $captcha;
 # AntiBotLinks
 require_once 'libs/antibotlinks.php';
 $antibotlinks = new antibotlinks(true);
 // true if GD is on on the server, false is less secure
 if (array_key_exists('address', $_POST)) {
     if (!$antibotlinks->check()) {
         $antibotlinks->generate(5, true);
         // number of links once they fail to solve min 3 - max 5, the second param MUST BE true
     }
 } else {
     $antibotlinks->generate(5);
     // initial number of links min 3 - max 5
 }
 if ($data['captcha'] && $data['apikey'] && $data['rewards']) {
     $data['enabled'] = true;
 }
 // check if ip eligible
 $q = $sql->prepare("SELECT TIMESTAMPDIFF(MINUTE, last_used, CURRENT_TIMESTAMP()) FROM Faucetinabox_IPs WHERE ip = ?");
 $q->execute(array(getIP()));
 if ($time = $q->fetch()) {
     $time = intval($time[0]);
Esempio n. 2
0
<?php

require_once "maincore.php";
if (isset($_POST['with'])) {
    global $apiurl, $apicode;
    $antibotlinks = new antibotlinks(true);
    $antibotlinks->check();
    if (!isset($_SESSION['user']['wallet'])) {
        check_wallet();
    }
    if ($solvemedia_active) {
        $solvemedia_response = solvemedia_check_answer($hashkey, $_SERVER["REMOTE_ADDR"], $_POST['adcopy_challenge'], $_POST['adcopy_response'], $verkey);
    }
    if ($recap_active) {
        $reCaptcha = new ReCaptcha($recap_secret);
        if ($_POST["g-recaptcha-response"]) {
            $resp = $reCaptcha->verifyResponse($_SERVER["REMOTE_ADDR"], $_POST["g-recaptcha-response"]);
        }
    }
    if ($csrf->check_valid('post')) {
        if ($antibotlinks->is_valid() && $anti_bot || !$anti_bot) {
            if ($solvemedia_active && $solvemedia_response->is_valid || $recap_active && $resp != null && $resp->success) {
                try {
                    $client = new SoapClient('https://api.epay.info/?wsdl');
                } catch (Exception $e) {
                    $client = new SoapClient('http://api.epay.info/?wsdl');
                }
                $prize = $_SESSION['prize'];
                if (!isset($_SESSION['prize'])) {
                    $prize = chance_creator($rewards);
                }