鐢≒HP鏉ュ姞瀵嗚В瀵咰loudflare閭绠变繚鎶

2022 年 4 月 17 日2110

Cloudflare 鏈変竴椤瑰姛鑳芥尯涓嶉敊鐨勶紝灏辨槸灏嗛〉闈涓婃墍鏈夌殑閭绠卞湴鍧閮藉姞瀵嗚捣鏉ワ紝闃叉㈡満鍣ㄤ汉鎶撳埌鐒跺悗骞插潖浜嬨

杩欓」鍔熻兘瑕佸湪鍚庡彴寮鍚 email address obfuscation

涔嬪悗灏卞彲浠ュ湪椤甸潰涓婂姞鍏ヤ竴涓閭绠卞湴鍧锛屾瘮濡傝 abc@abc.com

鏌ョ湅婧愪唬鐮佸氨鑳藉彂鐜扮被浼煎備笅鐨勪唬鐮

[email protected]

鎴戜滑鍙浠ヤ娇鐢 PHP 鐨勬柟寮忓皢杩欎釜閭绠卞湴鍧瑙e瘑鍑烘潵

function deCFEmail($encode){$k = hexdec(substr($encode,0,2));for($i=2, $m=''; $i < strlen($encode) - 1; $i += 2){$m.=chr(hexdec(substr($encode, $i, 2))^$k);}return $m;}echo deCFEmail("30515253705152531e535f5d")."\n";

寰楀埌鐨勭粨鏋滃氨鏄涓婇潰鎵璇寸殑 abc@abc.com

浣嗘槸鎴戜滑涓嶆兂鐢 Cloudflare 鐨勭浉鍏虫湇鍔★紝灏辨槸鍗曠函鎯崇敤浠栬繖绉嶅姞瀵嗘妧鏈锛屾墍浠ユ垜浠灏卞緱灏嗗姞瀵嗙殑绠楁硶涔熸壘鍑烘潵

鎴戜滑鍙浠ュ埄鐢ㄤ笂闈㈣В瀵嗙殑浠g爜鍙嶅悜鎵ц岋紝灏卞彲浠ュ緱鍒颁竴涓鍔犲瘑鐨勭畻娉曚簡

function encodeEmail($email, $key=0) {$chars = str_split($email);$string = '';$key = $key ? $key : rand(10, 99);foreach ($chars as $value) {$string .= sprintf("%02s", dechex(ord($value)^$key));}return dechex($key).$string;}

鎴戜滑灏辫兘鍒╃敤杩欎釜鍔犲瘑绠楁硶锛屽皢鎵嬫満鍙枫侀偖绠卞湴鍧銆佽韩浠借瘉绛夊悇绉嶆晱鎰熺殑淇℃伅閮藉姞瀵嗚捣鏉ワ紝闃叉㈠埆浜鸿兘杞绘槗鐨勬姄鍙栧埌鏁版嵁

0 0