Created
March 10, 2016 04:13
-
-
Save arthurbarros/6ec286a3f4029edae6b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
// $wordlist, acho que e a lista do challange anterior que retornou uma porrada de conteudo | |
$cookie_data = 'ClVLIh4ASCsCBE8lAxMacFMZV2hdVVotEhhUJQNVAmhSEV4sFxFeaAw' | |
function xor_encrypt($in, $key) { | |
# $key = '<censored>'; | |
$text = $in; | |
$outText = ''; | |
// Iterate through each character | |
for($i=0;$i<strlen($text);$i++) { | |
$outText .= $text[$i] ^ $key[$i % strlen($key)]; | |
} | |
return $outText; | |
} | |
foreach($wordlist as $word){ | |
$default_data = array('showpassword'=>'yes', 'bgcolor'=>$word); | |
$key = xor_encrypt($default_data, $word) | |
if($key == $cookie_data){ | |
echo $key; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment