Changeset 2303059
- Timestamp:
- 05/12/2020 01:11:28 AM (6 years ago)
- Location:
- vaptcha/trunk
- Files:
-
- 7 edited
-
VaptchaPlugin.php (modified) (14 diffs)
-
js/init-vaptcha.js (modified) (1 diff)
-
lib/Vaptcha.class.php (modified) (8 diffs)
-
lib/config.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
uninstall.php (modified) (1 diff)
-
vaptcha.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vaptcha/trunk/VaptchaPlugin.php
r1917973 r2303059 1 1 <?php 2 //禁用错误报告 3 error_reporting(0); 4 2 5 require_once plugin_dir_path( __FILE__ ) . 'lib/Vaptcha.class.php'; 3 6 require_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 5 13 class VaptchaPlugin 6 14 { … … 12 20 register_activation_hook(plugin_dir_path( __FILE__ ). 'vaptcha.php', array($this, 'init_default_options')); 13 21 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')); 14 24 $this->init_add_actions(); 15 25 … … 17 27 $this->vaptcha = new Vaptcha($options['vaptcha_vid'], $options['vaptcha_key']); 18 28 $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']); 19 37 } 20 38 … … 38 56 "https" => $https, 39 57 "color" => $color, 58 "offline_server" => site_url() . '/wp-json/vaptcha/offline', 59 // 'mode' => 'offline', 40 60 )); 41 61 return <<<HTML … … 108 128 function captcha_validate_comment($comment_data) { 109 129 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; 112 138 if (!$token || !$this->vaptcha->validate($challenge, $token)) { 113 139 wp_die(__('人机验证未通过', 'vaptcha')); … … 126 152 function captcha_validate_login($user) { 127 153 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 } 129 159 $token = $_POST['vaptcha_token']; 130 160 if (!$token || !$this->vaptcha->validate($challenge, $token)) { … … 141 171 function captcha_validate_register($errors) { 142 172 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']; 144 179 $token = $_POST['vaptcha_token']; 145 180 if (!$token || !$this->vaptcha->validate($challenge, $token)) { … … 163 198 $validated['vaptcha_width'] = trim($input['vaptcha_width']); 164 199 $validated['vaptcha_height'] = trim($input['vaptcha_height']); 165 $validated['vaptcha_ai'] = ($input['vaptcha_ai'] == "true" ? "true" : "false");166 200 $validated['https'] = ($input['vaptcha_ai'] == "true" ? "true" : "false"); 167 201 $validated['button_style'] = ($input['button_style'] == "light" ? "light" : "dark"); … … 183 217 if (!get_option('vaptcha_options')) { 184 218 $options = array( 185 'vaptcha_vid' => '5 9f97cd8a485d6214c57412a',186 'vaptcha_key' => ' 7c10e5ab8148415ea51711474c042e47',219 'vaptcha_vid' => '5e81543159ec213db68b11bd', 220 'vaptcha_key' => '54fa368bf2534a43b6a73082e571bed6', 187 221 'vaptcha_comment' => '1', 188 222 'vaptcha_register' => '1', … … 192 226 'vaptcha_width' => '', 193 227 'vaptcha_height' => '', 194 'vaptcha_ai' => 'true',228 // 'vaptcha_ai' => 'true', 195 229 'https' => 'false', 196 230 'button_style' => 'dark', 197 'type' => 'float' 231 'type' => 'float', 232 "offline_server" => site_url() . '/wp-json/vaptcha/offline', 233 // 'mode' => 'offline', 198 234 ); 199 235 add_option('vaptcha_options', $options); … … 211 247 212 248 function get_vaptcha_api() { 249 header('Content-Type: application/javascript'); 213 250 return json_decode($this->vaptcha->getChallenge()); 214 251 } 215 252 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']); 217 255 } 218 256 … … 236 274 return $data; 237 275 } 238 276 239 277 function init_add_actions() { 240 278 add_action('plugins_loaded', array($this, 'load_textdomain')); … … 244 282 add_action('admin_init', array($this, 'vaptcha_settings_init')); 245 283 add_action('admin_menu', array($this, 'vaptcha_options_page')); 246 247 284 add_action('woocommerce_login_form', array($this, 'captcha_in_woocommerce')); 248 285 add_action('woocommerce_register_form', array($this, 'captcha_in_woocommerce')); … … 253 290 register_rest_route( 'vaptcha', '/getchallenge', array( 254 291 'methods' => 'GET', 255 'callback' => array($this, 'get_vaptcha_api') 292 'callback' => array($this, 'get_vaptcha_api'), 256 293 )); 257 register_rest_route( 'vaptcha', '/ downtime', array(294 register_rest_route( 'vaptcha', '/offline', array( 258 295 'methods' => 'GET', 259 'callback' => array($this, 'get_downtime_api') 296 'callback' => array($this, 'get_downtime_api'), 260 297 )); 261 298 }); -
vaptcha/trunk/js/init-vaptcha.js
r1917973 r2303059 6 6 script = document.createElement('script'); 7 7 protocol = 'https'; //options.https ? 'https' : 'http'; 8 script.src = protocol + ':// cdn.vaptcha.com/v2.js';8 script.src = protocol + '://v.vaptcha.com/v3.js'; 9 9 script.id = 'vaptcha_v_js'; 10 10 script.async = true -
vaptcha/trunk/lib/Vaptcha.class.php
r1917973 r2303059 1 1 <?php 2 2 session_start(); 3 3 class Vaptcha 4 4 { 5 5 private $vid; 6 6 private $key; 7 private $publicKey;7 // private $publicKey; 8 8 private $lastCheckdownTime = 0; 9 9 private $isDown = false; … … 27 27 * @return void 28 28 */ 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']; 32 32 $now = $this->getCurrentTime(); 33 33 $query = "id=$this->vid&scene=$sceneId&time=$now&version=".$this->config['VERSION'].'&sdklang='.$this->config['SDK_LANG']; … … 35 35 if (!$this->isDown) 36 36 { 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; 41 41 self::$passedSignatures = array(); 42 42 return $this->getDownTimeCaptcha(); 43 43 } 44 if ( !$challenge) {44 if (empty($knock)) { 45 45 if ($this->getIsDwon()) { 46 46 $this->lastCheckdownTime = $now; … … 52 52 return json_encode(array( 53 53 "vid" => $this->vid, 54 " challenge" => $challenge54 "knock" => $knock 55 55 )); 56 56 } else { 57 57 if ($now - $this->lastCheckdownTime > $this->config['DOWNTIME_CHECK_TIME']) { 58 58 $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']){ 61 61 $this->isDown = false; 62 62 self::$passedSignatures = array(); 63 63 return json_encode(array( 64 64 "vid" => $this->vid, 65 " challenge" => $challenge65 "knock" => $knock 66 66 )); 67 67 } … … 74 74 * 二次验证 75 75 * 76 * @param [string] $ challenge流水号76 * @param [string] $knock 流水号 77 77 * @param [sring] $token 验证信息 78 78 * @param string $sceneId 场景ID 不填则为默认场景 79 79 * @return void 80 80 */ 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)) 84 85 return $this->downTimeValidate($token); 85 86 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; 87 99 } 88 100 89 101 private function getPublicKey() 90 102 { 91 return self::readContentFormGet($this->config[' PUBLIC_KEY_PATH']);103 return self::readContentFormGet($this->config['Channel_DownTime']); 92 104 } 93 105 94 106 private function getIsDwon() 95 107 { 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); 101 118 if (!$data) 102 119 return json_encode(array("error" => "params error")); 103 120 $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': 106 125 return $this->getDownTimeCaptcha(); 107 126 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) { 113 132 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 133 153 134 154 private function getSignature($time) … … 142 162 'signature' => $signature 143 163 )); 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; 144 199 } 145 200 … … 153 208 * @return void 154 209 */ 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) 173 241 { 174 242 if (!$token) 175 243 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; 177 247 $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; 187 267 } 188 268 189 269 private function downTimeValidate($token) 190 270 { 191 $strs = explode(' ,', $token);192 if (count($strs) < 2) 271 $strs = explode('-', $token); 272 if (count($strs) < 2) { 193 273 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); 197 278 $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']) { 199 281 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) { 213 284 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 214 300 } 215 301 } 216 302 } 217 303 218 private function getDownTimeCaptcha( )304 private function getDownTimeCaptcha($callback = null) 219 305 { 220 306 $time = $this->getCurrentTime(); 221 $md5 = md5($time .$this->key);307 $md5 = md5($time . $this->key); 222 308 $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( 229 320 "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; 236 340 } 237 341 238 342 private static function postValidate($url, $data) 239 343 { 240 $response = wp_remote_post( $url, array(344 $response = wp_remote_post( $url, array( 241 345 'body' => $data 242 346 )); … … 250 354 } 251 355 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; 257 382 } 258 383 } -
vaptcha/trunk/lib/config.php
r1917973 r2303059 6 6 'MAX_LENGTH' => 50000, 7 7 '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', 12 15 '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', 16 20 'REQUEST_UESD_UP' => '0209', 17 21 'DOWNTIME_CHECK_TIME' => 185000 -
vaptcha/trunk/readme.txt
r1917973 r2303059 1 === VAPTCHA:the CAPTCHA from future. ===1 === VAPTCHA:the CAPTCHA from future. === 2 2 Contributors: VAPTCHA:the CAPTCHA from future 3 3 Donate link: https://www.vaptcha.com 4 4 Tags: vaptcha, captcha, 验证, 验证码, 手势验证, 人机验证 5 Requires at least: 3.0.1 6 Requires PHP: 5.3.0 5 Requires at least: 4.6.0 6 Tested up to: 5.4.1 7 Stable tag: 3.0 8 Requires PHP: 5.6.2 7 9 License: GPLv2 or later 8 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 64 66 = 1.2.0 65 67 * 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 20 20 * 21 21 * @link https://www.vaptcha.com 22 * @since 1.2.022 * @since 3.0.3 23 23 * 24 24 * @package vaptcha -
vaptcha/trunk/vaptcha.php
r1917973 r2303059 4 4 Plugin URI: https://www.vaptcha.com 5 5 Description: VAPTCHA是”Variation Analysis - based Public Turing Test to Tell Computers and Humans Apart ”的简称,也叫手势验证。一种通过用户鼠标手势即可完成人机验证的图灵测试程序。VAPTCHA更加简单和安全,是目前传统验证码的最佳替代方案。VAPTCHA不仅大幅节省了用户在使用互联网服务时在人机验证上面的耗时,平均通过时间不超过1秒,同时也是目前世界上最不可能被破解的验证系统。 6 Version: 1.2.06 Version: 3.0.3 7 7 Author: vaptcha 8 8 Text Domain: vaptcha … … 27 27 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 28 28 */ 29 if ( !defined('ABSPATH') ) { 30 $path = $_SERVER['DOCUMENT_ROOT']; 31 include_once $path . '/wordpress/wp-load.php'; 32 } 29 33 30 34 require_once plugin_dir_path( __FILE__ ) . 'VaptchaPlugin.php';
Note: See TracChangeset
for help on using the changeset viewer.