天天看点

BugkuCTF 字符?正则?

BugkuCTF 字符?正则?

正则的题

<?php 
highlight_file('2.php');
$key='KEY{********************************}';
$IM= preg_match("/key.*key.{4,7}key:\/.\/(.*key)[a-z][[:punct:]]/i", trim($_GET["id"]), $match);
if( $IM ){ 
  die('key is: '.$key);
}
?> 
           

直接构造id

keyykeyyyyykey:/y/keyy.

BugkuCTF 字符?正则?

flag:KEY{0x0SIOPh550afc}