Skip to content

Instantly share code, notes, and snippets.

@arthurbarros
Created March 10, 2016 04:13
Show Gist options
  • Save arthurbarros/6ec286a3f4029edae6b2 to your computer and use it in GitHub Desktop.
Save arthurbarros/6ec286a3f4029edae6b2 to your computer and use it in GitHub Desktop.
<?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