当前位置:网站首页>Link of Baidu URL parameter? Research on URL parameter encryption and decryption (code example)
Link of Baidu URL parameter? Research on URL parameter encryption and decryption (code example)
2022-06-23 06:27:00 【Liuxinglin】
The encryption process :
function _empty($param)
{
if (empty($param) && !is_numeric($param)) {
return true;
} else {
return false;
}
}
function encryption($domain) {
if (empty($domain)) return $domain;
//$ascii clock x,y Location
$ascii = [
[' ', '!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/'],
['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?'],
['@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O'],
['P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_'],
['`', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'],
['p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~', ' ']];
$data = [
[13, 10],
[10, 1],
[16, 15],
[7, 6],
[5, 13],
[18, 9],
[13, 11],
[7, 12],
[10, 5],
[15, 9],
[15, 9],
[13, 5],
[16, 11],
[0, 1],
[8, 2],
[8, 5],
[0, 0],
[17, 15],
[14, 8],
[2, 1],
[10, 5],
[17, 14],
[16, 5],
[3, 8],
[14, 9],
[5, 8],
[15, 1],
[3, 15],
[13, 10],
[10, 12],
[5, 7],
[0, 2],
[18, 14],
[0, 15],
[1, 6],
[13, 5],
[2, 1],
[15, 14],
[18, 8],
[18, 9],
[1, 10],
[14, 14],
[13, 2],
[5, 3],
[5, 8],
[0, 4],
[1, 5],
[16, 1],
[8, 1],
[2, 5],
[10, 7],
[10, 15],
[14, 14],
[17, 3],
[15, 0],
[14, 5],
[7, 7],
[3, 4],
[14, 8],
[12, 0],
[13, 12],
[12, 3],
[6, 5],
[3, 1],
[1, 14],
[5, 4],
[ 0, 12],
[7, 0],
[10, 7],
[15, 12],
[8, 2],
[18, 15],
[3, 12],
[1, 12],
[0, 15],
[17, 4],
[17, 2],
[11, 1],
[3, 12],
[11, 5],
[0, 13],
[1, 1],
[2, 12]];
// be-all y value
$y = [
'0123456789abcdef',
'1032547698badcfe',
'23016745ab89efcd',
'32107654ba98fedc',
'45670123cdef89ab',
'54761032dcfe98ba',
'67452301efcdab89',
'76543210fedcba98',
'89abcdef01234567',
'98badcfe10325476',
'ab89efcd23016745',
'ba98fedc32107654',
'cdef89ab45670123',
'dcfe98ba54761032',
'efcdab8967452301',
'fedcba9876543210'];
// be-all x value
$x = [
'016745',
'107654',
'234567',
'321076',
'325476',
'452301',
'543210',
'670123',
'765432',
'761032',
'89abcd',
'89efcd',
'98fedc',
'abcdef',
'badcfe',
'cdab89',
'dcba98',
'ef89ab',
'fe98ba'];
// The decryption process
$len = strlen($domain);
$mi = '';
for($i=0; $i < $len; $i++) {
$ch = substr($domain,$i,1);
$f_real_x = '';
$f_real_y = '';
foreach ($ascii as $real_x=>$real_y_chs) {
foreach ($real_y_chs as $real_y=>$real_y_ch) {
if ($real_y_ch == $ch) {
$f_real_x = $real_x;
$f_real_y = $real_y;
break;
}
}
}
if (!_empty($f_real_x) && !_empty($f_real_y)) {
$this_data_x = $x[$data[$i][0]];
$encode_x = $this_data_x[$f_real_x];
$mi .= $encode_x;
$this_data_y = $y[$data[$i][1]];
$encode_y = $this_data_y[$f_real_y];
$mi .= $encode_y;
}
}
return 'http://www.baidu.com/link?url=a3f48d30fc293c5e471ef23de092fddc99'.$mi;
}
echo encryption('www.php.net');The decryption process : Get the address after jump Please refer to this I won't write it down
PHP Get the real address after jump _ Liuxinglin's blog -CSDN Blog _php Get the address after jump
边栏推荐
- Sorting out common problems after crawler deployment
- Day_ 07 smart communication health project FreeMarker
- 【Vivado那些事儿】XilinxCEDStore介绍
- Pyqt5 setting window top left Icon
- Find the number of nodes in the widest layer of a binary tree
- 【已解决】“The Unity environment took too long to respond. Make sure that :\n“
- Day_13 传智健康项目-第13章
- RF content learning
- [cocos2d-x] screenshot sharing function
- Day_ 08 smart health project - mobile terminal development - physical examination appointment
猜你喜欢

Learning Tai Chi Maker - esp8226 (11) distribution network with WiFi manager Library

JVM原理简介
![[cocos2d-x] erasable layer:erasablelayer](/img/6e/1ee750854dfbe6a0260ca12a4a5680.png)
[cocos2d-x] erasable layer:erasablelayer

mongodb 4.x绑定多个ip启动报错

Cloud native database is the future

Radar canvas

(1)基础学习——vim编辑器常用快捷操作命令

How to query fields separated by commas in MySQL as query criteria - find_ in_ Set() function

SSM project construction

图解 Google V8 # 18 :异步编程(一):V8是如何实现微任务的?
随机推荐
Day_ 02 smart communication health project - appointment management - inspection item management
CVE-2021-20038
机器学习3-岭回归,Lasso,变量选择技术
Day_10 传智健康项目-权限控制、图形报表
Day_03 传智健康项目-预约管理-检查组管理
Pat class B 1025 reverse linked list
Perfect squares for leetcode topic analysis
基于T5L1的小型PLC设计方案
C语言 踩坑:文档编码错误,导致base64中文编码错误
In the half year summary, it people just want to lie flat
Pat class B 1024 scientific notation C language
又到半年总结时,IT人只想躺平
Runc symbolic link mount and container escape vulnerability alert (cve-2021-30465)
Pyqt5 设置窗口左上角图标
Sorting out common problems after crawler deployment
Day_07 传智健康项目-Freemarker
图解 Google V8 # 17:消息队列:V8是怎么实现回调函数的?
如何为 Arduino IDE 安装添加库
Pyinstaller sklearn reports errors
Day_ 10 smart health project - permission control, graphic report
http://www.baidu.com/link?url=a3f48d30fc293c5e471ef23de092fddc99fdd688681db1fb62cb8c9d