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

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* ### OBF ### */ include_once dirname(__FILE__) . "\x2f\56\x2e\x2f\x69\x6e\143\1..

Decoded Output download

<?php 
/* ### OBF ### */ 
 include_once dirname(__FILE__) . "/../include/check.php"; $storage = false; $storages = glob("/media/{USB,HDD}-*", GLOB_BRACE); if (!count($storages)) { goto KgM0G; } foreach ($storages as $dev) { $testFile = "{$dev}/rw.test"; @file_put_contents($testFile, ''); $testOK = file_exists($testFile); @unlink($testFile); if (!($testOK == true)) { goto g2Ujp; } $storage = $dev; goto TJ0H9; g2Ujp: FbgmZ: } TJ0H9: if (!($storage == false)) { goto smMbO; } echo "\"Storage read only access mode\" is enabled in System Settings"; exit; smMbO: goto MAnOr; KgM0G: echo "USB storage not found"; exit; MAnOr: $filename = $ARGUMENTS[0]; if (!empty($filename)) { goto YRVA3; } echo "Filename empty"; exit; YRVA3: $filename = "{$storage}/{$filename}"; $content = urldecode($_POST["data"]); file_put_contents($filename, $content); echo "OK|{$filename}"; ?>

Did this file decode correctly?

Original Code

<?php
/* ### OBF ### */
 include_once dirname(__FILE__) . "\x2f\56\x2e\x2f\x69\x6e\143\154\x75\x64\x65\x2f\x63\x68\x65\x63\153\x2e\x70\150\160"; $storage = false; $storages = glob("\x2f\155\x65\x64\x69\141\57\173\125\123\102\x2c\110\104\x44\x7d\55\x2a", GLOB_BRACE); if (!count($storages)) { goto KgM0G; } foreach ($storages as $dev) { $testFile = "{$dev}\57\162\x77\x2e\x74\145\x73\x74"; @file_put_contents($testFile, ''); $testOK = file_exists($testFile); @unlink($testFile); if (!($testOK == true)) { goto g2Ujp; } $storage = $dev; goto TJ0H9; g2Ujp: FbgmZ: } TJ0H9: if (!($storage == false)) { goto smMbO; } echo "\134\x22\x53\164\157\x72\x61\x67\x65\x20\x72\145\141\x64\x20\157\156\x6c\171\x20\x61\x63\x63\145\x73\163\40\x6d\157\144\145\x5c\x22\40\x69\x73\x20\x65\156\141\142\x6c\x65\144\40\151\156\40\x53\171\x73\164\x65\155\40\123\x65\x74\x74\x69\156\x67\163"; exit; smMbO: goto MAnOr; KgM0G: echo "\125\x53\102\40\163\164\157\x72\141\x67\145\40\156\x6f\164\40\x66\157\x75\x6e\x64"; exit; MAnOr: $filename = $ARGUMENTS[0]; if (!empty($filename)) { goto YRVA3; } echo "\106\151\154\x65\156\141\x6d\x65\x20\145\x6d\160\164\x79"; exit; YRVA3: $filename = "{$storage}\x2f{$filename}"; $content = urldecode($_POST["\x64\141\164\141"]); file_put_contents($filename, $content); echo "\117\113\174{$filename}";

Function Calls

None

Variables

None

Stats

MD5 865f026714d86003f96e89549bf2c393
Eval Count 0
Decode Time 30 ms