Created
January 10, 2024 19:55
-
-
Save renini/7a229de15d8435c870d89cbd53d65ed1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$counter = 0 | |
$decodedctr = 0 | |
Push-Location C:\ioncube_priv8_decoder_v1\php\IC6_5.2 | |
foreach ($file in Get-Content zend-encrypted-files.txt) { | |
$targetfile = $file.Replace('C:\source\', 'C:\source-decoded\') | |
$targetdir = [System.IO.Path]::GetDirectoryName($targetfile) | |
Write-Host Decoding $file to $targetdir | |
[System.IO.Directory]::CreateDirectory($targetdir) | |
./php.exe $file /execute /path:$targetdir | |
$counter++ | |
$decodedfile = $targetfile -replace "\.php$", ".de.php" | |
if (Test-Path $decodedfile) { | |
Write-Host $decodedfile exist, now rename to $targetfile | |
$decodedctr++ | |
Rename-Item -Path $decodedfile -NewName $targetfile | |
} | |
} | |
Pop-Location | |
Write-Host total php files: $counter | |
Write-Host total converted files: $decodedctr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment