Created
May 11, 2020 20:02
-
-
Save developerfromjokela/4e826fd8e8621bec4cf17f93c2e3a376 to your computer and use it in GitHub Desktop.
This PHP Script will decode a base64-encoded file to a separate file, command: php b64_decoder.php filename
This file contains 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 | |
$targetPath=__DIR__."/".$argv[1]; | |
echo $targetPath; | |
$data = file_get_contents($targetPath); | |
$content= base64_decode($data); | |
$file = fopen($targetPath.".decoded", 'w'); | |
fwrite($file, $content); | |
fclose($file); | |
echo "done"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment