-
-
Save vhqtvn/c6922f2b6955714488bf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$cs=str_split("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); | |
foreach ($cs as $i) { | |
test($i); | |
foreach ($cs as $j) { | |
test($i.$j); | |
foreach ($cs as $k) { | |
test($i.$j.$k); | |
} | |
} | |
} | |
$sol=[]; | |
foreach (array_merge($cs,["+","/"]) as $i) { | |
if(!isset($a[$i])) $sol[]=$i; | |
} | |
usort($sol, function($a,$b){return ord($a)-ord($b);}); | |
echo implode("",$sol)."\n"; | |
echo 'TMCTF{'.sha1(implode("",$sol)).'}'; | |
function test($s){ | |
global $a; | |
foreach(str_split(base64_encode($s)) as $c) $a[$c]=1; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment