Skip to content

Instantly share code, notes, and snippets.

@javierwilson
Created April 22, 2013 22:26
Show Gist options
  • Save javierwilson/5439113 to your computer and use it in GitHub Desktop.
Save javierwilson/5439113 to your computer and use it in GitHub Desktop.
decodifica recursivamente código de hackers
<?php
$var = "TEXTO_CODIFICADO_EN_BASE64";
decodifica(base64_decode($var));
function decodifica($text) {
$a = $text;
$a = preg_replace('/eval\((.*)\);/', '\\1', $a);
if (preg_match('/base64_decode/', $a)) {
$a = preg_replace('/base64_decode\("(.*)"\)/', '\\1', $a);
$a = base64_decode($a);
print "\n--------------------------\n";
print $a;
print "\n--------------------------\n";
$a = decodifica($a);
} else {
print $a;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment