打印编码字符串 [英] Printing an encoded string

查看:136
本文介绍了打印编码字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在看这个问题(这是一个CakePHP黑客某些类型?),当我看代码时,我看到这行:

I was looking at this question ( Is this a CakePHP hacking of some kind? ), and when I was looking at the code, I saw this line:

$wp_cw_kses_split = '>=^/E]u*PDAF$!V'^']O;N18*L%*"2MN8';

当我回应这个,它回声 create_function

When I echo this, it echos create_function.

演示:

Demo: http://ideone.com/rk2Og

推荐答案

它对两个字符串进行位异或运算,'> = ^ / E] u * PDAF $!V' '] O; N18 * L%*2MN8

var_dump('>' ^ ']'); // string(1) "c"
var_dump('=' ^ 'O'); // string(1) "r"
var_dump('^' ^ ';'); // string(1) "e"
// ... etc

XOR操作是对字符的ASCII码进行的,因此对于第一个,

The bitwise XOR operation is done on the ASCII code of the characters, so for the first one,

">" = 62 (ASCII) = 0111110
 ^  = XOR          -------
"]" = 93 (ASCII) = 1011101
==========================
"c" = 99 (ASCII) = 1100011

这篇关于打印编码字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆