Plugin Directory

Changeset 2303059


Ignore:
Timestamp:
05/12/2020 01:11:28 AM (6 years ago)
Author:
vaptcha
Message:

update V3

Location:
vaptcha/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • vaptcha/trunk/VaptchaPlugin.php

    r1917973 r2303059  
    11<?php
     2//禁用错误报告
     3error_reporting(0);
     4
    25require_once plugin_dir_path( __FILE__ ) . 'lib/Vaptcha.class.php';
    36require_once plugin_dir_path( __FILE__ ) . 'options.php';
    4    
     7// require_once plugins_url('lib/Vaptcha.class.php',__FILE__);
     8// require_once plugins_url('options.php',__FILE__);
     9//使用php的导入方式
     10//   require_once dirname(__FILE__) . '/options.php';
     11//   require_once dirname(__FILE__) . '/lib/Vaptcha.class.php';
     12
    513class VaptchaPlugin
    614{
     
    1220        register_activation_hook(plugin_dir_path( __FILE__ ). 'vaptcha.php', array($this, 'init_default_options'));
    1321        register_activation_hook(plugin_dir_path( __FILE__ ) . 'vaptcha.php', array($this, 'uninstall'));
     22        // register_activation_hook( dirname(__FILE__) . '/vaptcha.php', array($this, 'init_default_options'));
     23        // register_activation_hook( dirname(__FILE__) . '/vaptcha.php', array($this, 'uninstall'));
    1424        $this->init_add_actions();
    1525
     
    1727        $this->vaptcha = new Vaptcha($options['vaptcha_vid'], $options['vaptcha_key']);         
    1828        $this->options = $options;
     29    }
     30
     31    public function knock() {
     32        return $this->vaptcha->getknock($_REQUEST['scene']);
     33    }
     34
     35    public function offline() {
     36        return $this->vaptcha->downTime($_GET['offline_action'], $_GET['callback'], $_GET['v'], $_GET['knock']);
    1937    }
    2038
     
    3856            "https" => $https,
    3957            "color" => $color,
     58            "offline_server" => site_url() . '/wp-json/vaptcha/offline',
     59            // 'mode' => 'offline',
    4060        ));
    4161        return <<<HTML
     
    108128    function captcha_validate_comment($comment_data) {
    109129        if($this->options['vaptcha_comment'] == 0) return $comment_data;       
    110         $challenge = $_POST['vaptcha_challenge'];
    111         $token = $_POST['vaptcha_token'];
     130        if(!isset($_POST['vaptcha_challenge'])){
     131             $challenge = '';
     132        }else{
     133             $challenge = $_POST['vaptcha_challenge'];
     134        }
     135        // $challenge = $_POST['vaptcha_challenge'];
     136        $token = $_POST['vaptcha_token'];
     137        echo $token;
    112138        if (!$token || !$this->vaptcha->validate($challenge, $token)) {
    113139            wp_die(__('人机验证未通过', 'vaptcha'));
     
    126152    function captcha_validate_login($user) {
    127153        if($this->options['vaptcha_login'] == 0) return $user;
    128         $challenge = $_POST['vaptcha_challenge'];
     154        if(!isset($_POST['vaptcha_challenge'])){
     155             $challenge = '';
     156        }else{
     157             $challenge = $_POST['vaptcha_challenge'];
     158        }
    129159        $token = $_POST['vaptcha_token'];
    130160        if (!$token || !$this->vaptcha->validate($challenge, $token)) {
     
    141171    function captcha_validate_register($errors) {
    142172        if($this->options['vaptcha_register'] == 0) return $errors;
    143         $challenge = $_POST['vaptcha_challenge'];
     173        if(!isset($_POST['vaptcha_challenge'])){
     174             $challenge = '';
     175        }else{
     176             $challenge = $_POST['vaptcha_challenge'];
     177        }
     178        // $challenge = $_POST['vaptcha_challenge'];
    144179        $token = $_POST['vaptcha_token'];
    145180        if (!$token || !$this->vaptcha->validate($challenge, $token)) {
     
    163198        $validated['vaptcha_width'] = trim($input['vaptcha_width']);
    164199        $validated['vaptcha_height'] = trim($input['vaptcha_height']);
    165         $validated['vaptcha_ai'] = ($input['vaptcha_ai'] == "true" ? "true" : "false");
    166200        $validated['https'] = ($input['vaptcha_ai'] == "true" ? "true" : "false");
    167201        $validated['button_style'] = ($input['button_style'] == "light" ? "light" : "dark");
     
    183217        if (!get_option('vaptcha_options')) {
    184218            $options = array(
    185                 'vaptcha_vid' => '59f97cd8a485d6214c57412a',
    186                 'vaptcha_key' => '7c10e5ab8148415ea51711474c042e47',
     219                'vaptcha_vid' => '5e81543159ec213db68b11bd',
     220                'vaptcha_key' => '54fa368bf2534a43b6a73082e571bed6',
    187221                'vaptcha_comment' => '1',
    188222                'vaptcha_register' => '1',
     
    192226                'vaptcha_width' => '',
    193227                'vaptcha_height' => '',
    194                 'vaptcha_ai' => 'true',
     228                // 'vaptcha_ai' => 'true',
    195229                'https' => 'false',
    196230                'button_style' => 'dark',
    197                 'type' => 'float'
     231                'type' => 'float',
     232                "offline_server" => site_url() . '/wp-json/vaptcha/offline',
     233                // 'mode' => 'offline',
    198234            );
    199235            add_option('vaptcha_options', $options);
     
    211247
    212248    function get_vaptcha_api() {
     249        header('Content-Type: application/javascript');
    213250        return json_decode($this->vaptcha->getChallenge());
    214251    }
    215252    function get_downtime_api() {
    216         return json_decode($this->vaptcha->downTime($_GET['data']));
     253        header('Content-Type: application/javascript');
     254        return $this->vaptcha->downTime($_GET['offline_action'], $_GET['callback']);
    217255    }
    218256
     
    236274        return $data;
    237275    }
    238    
     276
    239277    function init_add_actions() {
    240278        add_action('plugins_loaded', array($this, 'load_textdomain'));
     
    244282        add_action('admin_init', array($this, 'vaptcha_settings_init'));
    245283        add_action('admin_menu', array($this, 'vaptcha_options_page'));
    246 
    247284        add_action('woocommerce_login_form', array($this, 'captcha_in_woocommerce'));
    248285        add_action('woocommerce_register_form', array($this, 'captcha_in_woocommerce'));
     
    253290            register_rest_route( 'vaptcha', '/getchallenge', array(
    254291                'methods' => 'GET',
    255                 'callback' => array($this, 'get_vaptcha_api')
     292                'callback' => array($this, 'get_vaptcha_api'),
    256293            ));
    257             register_rest_route( 'vaptcha', '/downtime', array(
     294            register_rest_route( 'vaptcha', '/offline', array(
    258295                'methods' => 'GET',
    259                 'callback' => array($this, 'get_downtime_api')
     296                'callback' => array($this, 'get_downtime_api'),
    260297            ));
    261298        });
  • vaptcha/trunk/js/init-vaptcha.js

    r1917973 r2303059  
    66            script = document.createElement('script');
    77            protocol = 'https'; //options.https ? 'https' : 'http';
    8             script.src = protocol + '://cdn.vaptcha.com/v2.js';
     8            script.src = protocol + '://v.vaptcha.com/v3.js';
    99            script.id = 'vaptcha_v_js';
    1010            script.async = true
  • vaptcha/trunk/lib/Vaptcha.class.php

    r1917973 r2303059  
    11<?php
    2 
     2session_start();
    33class Vaptcha
    44{
    55    private $vid;
    66    private $key;
    7     private $publicKey;
     7    // private $publicKey;
    88    private $lastCheckdownTime = 0;
    99    private $isDown = false;
     
    2727     * @return void
    2828     */
    29     public function getChallenge($sceneId = "")
    30     {
    31         $url = $this->config['API_URL'].$this->config['GET_CHALLENGE_URL'];
     29    public function getChallenge($sceneId = 0)
     30    {
     31        $url = $this->config['API_URL'].$this->config['GET_knock_URL'];
    3232        $now = $this->getCurrentTime();
    3333        $query = "id=$this->vid&scene=$sceneId&time=$now&version=".$this->config['VERSION'].'&sdklang='.$this->config['SDK_LANG'];
     
    3535        if (!$this->isDown)
    3636        {
    37             $challenge = self::readContentFormGet("$url?$query&signature=$signature");
    38             if ($challenge === $this->config['REQUEST_UESD_UP']) {
    39                 $this->lastCheckdownTime = $now;
    40                 $this->isDown = true;
     37            $knock = self::readContentFormGet("$url?$query&signature=$signature");
     38            if ($knock === $this->config['REQUEST_UESD_UP']) {
     39                // $this->lastCheckdownTime = $now;
     40                // $this->isDown = true;
    4141                self::$passedSignatures = array();
    4242                return $this->getDownTimeCaptcha();
    4343            }
    44             if (!$challenge) {
     44            if (empty($knock)) {
    4545                if ($this->getIsDwon()) {
    4646                    $this->lastCheckdownTime = $now;
     
    5252            return json_encode(array(
    5353                "vid" =>  $this->vid,
    54                 "challenge" => $challenge
     54                "knock" => $knock
    5555            ));
    5656        } else {
    5757        if ($now - $this->lastCheckdownTime > $this->config['DOWNTIME_CHECK_TIME']) {
    5858                $this->lastCheckdownTime = $now;
    59                 $challenge = self::readContentFormGet("$url?$query&signature=$signature");
    60                 if ($challenge && $challenge != $this->config['REQUEST_UESD_UP']){
     59                $knock = self::readContentFormGet("$url?$query&signature=$signature");
     60                if ($knock && $knock != $this->config['REQUEST_UESD_UP']){
    6161                    $this->isDown = false;
    6262                    self::$passedSignatures = array();
    6363                    return json_encode(array(
    6464                        "vid" =>  $this->vid,
    65                         "challenge" => $challenge
     65                        "knock" => $knock
    6666                    ));
    6767                }
     
    7474     * 二次验证
    7575     *
    76      * @param [string] $challenge 流水号
     76     * @param [string] $knock 流水号
    7777     * @param [sring] $token 验证信息
    7878     * @param string $sceneId 场景ID 不填则为默认场景
    7979     * @return void
    8080     */
    81     public function validate($challenge, $token, $sceneId = "")
    82     {
    83         if ($this->isDown)
     81    public function validate($knock, $token, $sceneId = 0)
     82    {
     83        $str = 'ffline-';
     84        if (strpos($token, $str, 0))
    8485            return $this->downTimeValidate($token);
    8586        else
    86             return $this->normalValidate($challenge, $token, $sceneId);
     87            return $this->normalValidate($knock, $token, $sceneId);
     88    }
     89
     90    public function getChannelData()
     91    {
     92        $url = $this->config['Channel_DownTime'] . $this->vid;
     93        $response = wp_remote_get($url);
     94        $res = $response['body'];
     95        $data = str_replace('static(', '',  $res);
     96        $data = str_replace(')', '', $data);
     97        $data = json_decode($data, true);
     98        return $data;
    8799    }
    88100
    89101    private function getPublicKey()
    90102    {
    91         return self::readContentFormGet($this->config['PUBLIC_KEY_PATH']);
     103        return self::readContentFormGet($this->config['Channel_DownTime']);
    92104    }
    93105
    94106    private function getIsDwon()
    95107    {
    96         return !!self::readContentFormGet($this->config['IS_DOWN_PATH']) == 'true';
    97     }
    98 
    99     public function downTime($data)
    100     {
     108        // return !!self::readContentFormGet($this->config['DOWNTIME_URL']) == 'true';
     109        $channel = self::getChannelData();
     110        if($channel['state']== 1) {self::$isDown = false;return true;}
     111        if($channel['offline']== 1) {self::$isDown = true;return true;}
     112        return false;
     113    }
     114
     115    public function downTime($data, $callback, $v=null, $knock=null)
     116    {
     117        // return json_encode($data);
    101118        if (!$data)
    102119            return json_encode(array("error" => "params error"));
    103120        $datas = explode(',', $data);
    104         switch($datas[0]) {
    105             case 'request':
     121        switch ($datas[0]) {
     122            case 'get':
     123                return $this->getDownTimeCaptcha($callback);
     124            case 'request':
    106125                return $this->getDownTimeCaptcha();
    107126            case 'getsignature':
    108                 if (count($datas) < 2)
    109                     return json_encode(array("error" => "params error"));
    110                 else {
    111                     $time = (int)$datas[1];
    112                     if ((bool)$time)
     127                if (count($datas) < 2) {
     128                    return array("error" => "params error");
     129                } else {
     130                    $time = (int) $datas[1];
     131                    if ((bool) $time) {
    113132                        return $this->getSignature($time);
    114                     else
    115                         return json_encode(array("error" => "params error"));
    116                 }
    117             case 'check':
    118                 if (count($datas) < 5)
    119                     return json_encode(array("error" => "params error"));
    120                 else {
    121                     $time1 = (int)$datas[1];
    122                     $time2 = (int)$datas[2];
    123                     $signature = $datas[3];
    124                     $captcha = $datas[4];
    125                     if ((bool)$time1 && (bool)$time2)
    126                         return $this->downTimeCheck($time1, $time2, $signature, $captcha);
    127                     return json_encode(array("error" => "parms error"));
    128                 }
    129             default:
    130                 return json_encode(array("error" => "parms error"));
    131         }
    132     }
     133                    } else {
     134                        return array("error" => "params error");
     135                    }
     136
     137                }
     138            case 'verify':
     139                if ($v == null) {
     140                    return array("error" => "params error");
     141                } else {
     142                    return $this->downTimeCheck($callback ,$v, $knock);
     143                }
     144            default:
     145                return array("error" => "parms error");
     146        }
     147    }
     148
     149    private function getCurrentTime() {
     150        return number_format(floor(microtime(true) * 1000), 0, '', '');
     151    }
     152
    133153
    134154    private function getSignature($time)
     
    142162            'signature' => $signature
    143163        ));
     164    }
     165
     166    public static function set($key, $value, $expire = 600)
     167    {
     168        $data = $_SESSION[$key];
     169        return $_SESSION[$key] = array(
     170            'value' => $value,
     171            'create' => time(),
     172            'readcount' => 0,
     173            'expire' => $data['expire'] ? $data['expire'] : $expire,
     174        );
     175    }
     176
     177    public static function get($key, $default = null)
     178    {
     179        $data = $_SESSION[$key];
     180        $now = time();
     181        if (!$data) {
     182            return $default;
     183        } else if ($now - $data['create'] > $data['expire']) {
     184            return $default;
     185        } else {
     186            $_SESSION[$key]['readcount']++;
     187            return $data['value'];
     188        }
     189    }
     190
     191    public function create_uuid($prefix = ""){
     192        $str = md5(uniqid(mt_rand(), true));   
     193        $uuid  = substr($str,0,8) . '-';   
     194        $uuid .= substr($str,8,4) . '-';   
     195        $uuid .= substr($str,12,4) . '-';   
     196        $uuid .= substr($str,16,4) . '-';   
     197        $uuid .= substr($str,20,12);   
     198        return $prefix . $uuid;
    144199    }
    145200
     
    153208     * @return void
    154209     */
    155     private function downTimeCheck($time1, $time2, $signature, $captcha)
    156     {
    157         $now = $this->getCurrentTime();
    158         if ($now - $time1 > $this->config['REQUEST_ABATE_TIME'] ||
    159             $signature != md5($time2.$this->key) ||
    160             $now - $time2 < $this->config['VALIDATE_WAIT_TIME'])
    161             return json_encode(array("result" => false));
    162         $trueCaptcha = substr(md5($time1.$this->key), 0, 3);
    163         if ($trueCaptcha == strtolower($captcha))
    164             return json_encode(array(
    165                 "result" => true,
    166                 'token' => $now.','.md5($now.$this->key.'vaptcha')
    167             ));
    168         else
    169             return json_encode(array("result" => false));       
    170     }
    171 
    172     private function normalValidate($challenge, $token, $sceneId)
     210    private function downTimeCheck($callback, $v, $knock)
     211    {
     212        $data = $this->getChannelData();
     213        $dtkey = $data['offline_key'];
     214        $imgs = $this->get($knock);
     215        unset($_SESSION[$knock]);
     216        $address = md5($v.$imgs);
     217        $url = DOWNTIME_URL.$dtkey.'/'.$address;
     218        $response = wp_remote_get($url);
     219        $res = $response['body'];
     220        $httpCode = $response['response']['code'];
     221        if($httpCode == 200) {
     222            $token = 'offline-'.$knock.'-'.$this->create_uuid().'-'.$this->getCurrentTime();;
     223            $this->set($token, $this->getCurrentTime());
     224            return $callback.'('.json_encode(array(
     225                "code" => '0103',
     226                "msg" => "",
     227                "token" => $token
     228            )).')';
     229        }
     230        else {
     231            return $callback.'('.json_encode(array(
     232                "code" => '0104',
     233                "msg" => "0104",
     234                "token" => "",
     235            )).')';
     236        }
     237       
     238    }
     239
     240    private function normalValidate($knock, $token, $sceneId)
    173241    {
    174242        if (!$token)
    175243            return false;
    176         $url = $this->config[API_URL].$this->config[VALIDATE_URL];
     244        $ip = $this->getClientIp();
     245        $query = "id=$this->vid&scene=$sceneId&secretkey=$this->key&token=$token&ip=$ip";
     246        $url = $this->config['API_URL'].$this->config['VALIDATE_URL'].'?' . $query;
    177247        $now = $this->getCurrentTime();
    178         // $query = "id=$this->vid&scene=$sceneId&secretkey=$this->key&token=$token&ip=$_SERVER[REMOTE_ADDR]";
    179         $response = json_decode(self::postValidate($url, array(
    180             'id' => $this->vid,
    181             'scene' => $sceneId,
    182             'secretkey' => $this->key,
    183             'token' => $token,
    184             'ip' => $_SERVER[REMOTE_ADDR]
    185         )));
    186         return $response->success == 1;
     248        $response = json_decode(self::postValidate($url, $query));
     249        return $response->success == 1 ? true : false;
     250    }
     251
     252    public function getClientIp()
     253    {
     254        if (getenv('HTTP_X_FORWARDED_FOR')) {
     255            $ip = getenv('HTTP_X_FORWARDED_FOR');
     256            $ips = explode(',', $ip);
     257            $ip = $ips[0];
     258        } else if (getenv('HTTP_X_REAL_IP')) {
     259            $ip = getenv('HTTP_X_REAL_IP');
     260        } else if (getenv('REMOTE_ADDR')) {
     261            $ip = getenv('REMOTE_ADDR');
     262        } else {
     263            $ip = '127.0.0.1';
     264        }
     265
     266        return $ip;
    187267    }
    188268
    189269    private function downTimeValidate($token)
    190270    {
    191         $strs = explode(',', $token);
    192         if (count($strs) < 2)
     271        $strs = explode('-', $token);
     272        if (count($strs) < 2) {
    193273            return false;
    194         else {
    195             $time = (int)$strs[0];
    196             $signature = $strs[1];
     274        } else {
     275            $time = (int) $strs[count($strs) - 1];
     276            // $signature = $strs[1];
     277            $storageTIme = $this->get($token);
    197278            $now = $this->getCurrentTime();
    198             if ($now - $time > $this->config['VALIDATE_PASS_TIME'])
     279            // return $time.'  '.($strs[count($strs)]);
     280            if ($now - $time > $this->config['VALIDATE_PASS_TIME']) {
    199281                return false;
    200             else {
    201                 $signatureTrue = md5($time.$this->key.'vaptcha');
    202                 if ($sigantureTrue) {
    203                     if (in_array($signature, self::$passedSignatures))
    204                         return false;
    205                     else {
    206                         array_push(self::$passedSignatures, $signature);
    207                         $length = count(self::$passedSignatures);
    208                         if ($length > MAX_LENGTH)
    209                             array_splice(self::$passedSignatures, 0, $length - MAX_LENGTH + 1);
    210                         return true;
    211                     }
    212                 } else
     282            } else {
     283                if ($storageTIme && $storageTIme==$time) {
    213284                    return true;
     285                    // if (in_array($signature, self::$passedSignatures)) {
     286                    //     return false;
     287                    // } else {
     288                    //     array_push(self::$passedSignatures, $signature);
     289                    //     $length = count(self::$passedSignatures);
     290                    //     if ($length > MAX_LENGTH) {
     291                    //         array_splice(self::$passedSignatures, 0, $length - MAX_LENGTH + 1);
     292                    //     }
     293
     294                    //     return true;
     295                    // }
     296                } else {
     297                    return false;
     298                }
     299
    214300            }
    215301        }
    216302    }
    217303
    218     private function getDownTimeCaptcha()
     304    private function getDownTimeCaptcha($callback = null)
    219305    {
    220306        $time = $this->getCurrentTime();
    221         $md5 = md5($time.$this->key);
     307        $md5 = md5($time . $this->key);
    222308        $captcha = substr($md5, 0, 3);
    223         $verificationKey = substr($md5,30);
    224         if (!$this->publicKey)
    225             $this->publicKey = $this->getPublicKey();
    226         $url = md5($captcha.$verificationKey.$this->publicKey).$this->config['PIC_POST_FIX'];
    227         $url = $this->config['DOWN_TIME_PATH'].$url;
    228         return json_encode(array(
     309        // if (!self::$publicKey) {
     310        //     self::$publicKey = $this->getPublicKey();
     311        // }
     312        $data = $this->getChannelData();
     313        $knock = md5($captcha . $$time . $data['offline_key']);
     314        $ul = $this->getImgUrl();
     315        $url = md5($data['offline_key'] . $ul);
     316        // self::$imgid = $url;
     317        $this->set($knock, $url);
     318        // Session::set($knock, $url);
     319        return $callback===null?array(
    229320            "time" => $time,
    230             "url" => $url
    231         ));
    232     }
    233 
    234     private function getCurrentTime() {
    235         return number_format(floor(microtime(true) * 1000), 0, '', '');
     321            "url" => $url,
     322        ): $callback.'('.json_encode(array(
     323            "time" => $time,
     324            "imgid" => $url,
     325            "code" => '0103',
     326            "knock" => $knock,
     327            "msg" => "",
     328        )).')';
     329    }
     330
     331    private function getImgUrl()
     332    {
     333        $str = '0123456789abcdef';
     334        $data = '';
     335        for ($i=0; $i < 4; $i++) {
     336            # code...
     337            $data = $data.$str[rand(0, 15)];
     338        }
     339        return $data;
    236340    }
    237341
    238342    private static function postValidate($url, $data)
    239343    {
    240         $response = wp_remote_post( $url, array(
     344         $response = wp_remote_post( $url, array(
    241345            'body' => $data
    242346        ));
     
    250354    }
    251355
    252     private function HMACSHA1($key, $text)
    253     {
    254         $result = hash_hmac('sha1', $text, $key, true);
    255         $result = str_replace(array('/', '+', '='), '', base64_encode($result));
    256         return $result;
     356    private function HMACSHA1($key, $str)
     357    {
     358        $signature = ""; 
     359        if (function_exists('hash_hmac')) {
     360            $signature = hash_hmac("sha1", $str, $key, true);
     361        } else {
     362            $blocksize = 64; 
     363            $hashfunc = 'sha1'; 
     364            if (strlen($key) > $blocksize) { 
     365                $key = pack('H*', $hashfunc($key)); 
     366            } 
     367            $key = str_pad($key, $blocksize, chr(0x00)); 
     368            $ipad = str_repeat(chr(0x36), $blocksize); 
     369            $opad = str_repeat(chr(0x5c), $blocksize); 
     370            $signature = pack( 
     371                    'H*', $hashfunc( 
     372                            ($key ^ $opad) . pack( 
     373                                    'H*', $hashfunc( 
     374                                            ($key ^ $ipad) . $str 
     375                                    ) 
     376                            ) 
     377                    ) 
     378            ); 
     379        } 
     380        $signature = str_replace(array('/', '+', '='), '', base64_encode($signature));
     381        return $signature; 
    257382    }
    258383}
  • vaptcha/trunk/lib/config.php

    r1917973 r2303059  
    66    'MAX_LENGTH' => 50000,
    77    'PIC_POST_FIX' => ".png",
    8     'PUBLIC_KEY_PATH' => "http://down.vaptcha.com/publickey",
    9     'IS_DOWN_PATH' => "http://down.vaptcha.com/isdown",
    10     'DOWN_TIME_PATH' => "downtime/",
    11     'VERSION' => '1.1.0',
     8    // 'PUBLIC_KEY_PATH' => "http://down.vaptcha.com/publickey",
     9    // 'IS_DOWN_PATH' => "http://down.vaptcha.com/isdown",
     10    // 'Channel_DownTime' => "https://channel.vaptcha.com/config/",
     11    'Channel_DownTime' => "http://channel2.vaptcha.com/config/",
     12    'DOWN_TIME_PATH' => "offline/",
     13    'DOWNTIME_URL' => "https://offline.vaptcha.com/",
     14    'VERSION' => '3.0.3',
    1215    'SDK_LANG' => 'php',
    13     'API_URL' => 'http://api.vaptcha.com/v2',
    14     'GET_CHALLENGE_URL' => '/challenge',
    15     'VALIDATE_URL' => '/validate',
     16    'API_URL' => 'http://0.vaptcha.com',
     17    // 'GET_CHALLENGE_URL' => '/challenge',
     18    'GET_knock_URL' => '/knock',
     19    'VALIDATE_URL' => '/verify',
    1620    'REQUEST_UESD_UP' => '0209',
    1721    'DOWNTIME_CHECK_TIME' => 185000
  • vaptcha/trunk/readme.txt

    r1917973 r2303059  
    1 === VAPTCHA:the CAPTCHA from future. ===
     1=== VAPTCHA:the CAPTCHA from future. ===
    22Contributors: VAPTCHA:the CAPTCHA from future
    33Donate link: https://www.vaptcha.com
    44Tags: vaptcha, captcha, 验证, 验证码, 手势验证, 人机验证
    5 Requires at least: 3.0.1
    6 Requires PHP: 5.3.0
     5Requires at least: 4.6.0
     6Tested up to: 5.4.1
     7Stable tag: 3.0
     8Requires PHP: 5.6.2
    79License: GPLv2 or later
    810License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6466= 1.2.0
    6567* Update VAPTCHA v2.0
     68
     69= 1.3.0
     70* Update VAPTCHA v3.0
     71
     72== Upgrade Notice ==
     73
     74= 1.3.0 =
     75* Update VAPTCHA v3.0
  • vaptcha/trunk/uninstall.php

    r1917973 r2303059  
    2020 *
    2121 * @link       https://www.vaptcha.com
    22  * @since      1.2.0
     22 * @since      3.0.3
    2323 *
    2424 * @package    vaptcha
  • vaptcha/trunk/vaptcha.php

    r1917973 r2303059  
    44Plugin URI: https://www.vaptcha.com
    55Description: VAPTCHA是”Variation Analysis - based Public Turing Test to Tell Computers and Humans Apart ”的简称,也叫手势验证。一种通过用户鼠标手势即可完成人机验证的图灵测试程序。VAPTCHA更加简单和安全,是目前传统验证码的最佳替代方案。VAPTCHA不仅大幅节省了用户在使用互联网服务时在人机验证上面的耗时,平均通过时间不超过1秒,同时也是目前世界上最不可能被破解的验证系统。
    6 Version: 1.2.0
     6Version: 3.0.3
    77Author: vaptcha
    88Text Domain: vaptcha
     
    2727    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    2828*/
     29if ( !defined('ABSPATH') ) {
     30    $path = $_SERVER['DOCUMENT_ROOT'];
     31    include_once $path . '/wordpress/wp-load.php';
     32}
    2933
    3034require_once plugin_dir_path( __FILE__ ) . 'VaptchaPlugin.php';
Note: See TracChangeset for help on using the changeset viewer.