# Dexorser Windows One-Line Installer & Updater [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 $OutputEncoding = [System.Text.Encoding]::UTF8 $Host.UI.RawUI.WindowTitle = "Dexorser Quick Installer" Write-Host "=========================================================" -ForegroundColor Cyan Write-Host " Dexorser (VDS-Secured) Installer & Updater " -ForegroundColor Cyan Write-Host " High-Performance Web Infrastructure with App Dock " -ForegroundColor DarkGray Write-Host "=========================================================" -ForegroundColor Cyan function Send-CrashReport($stage, $details) { try { $payload = @{ source = "installer" stage = $stage error = $details os = [System.Environment]::OSVersion.ToString() user = $env:USERNAME time = (Get-Date).ToString("o") } | ConvertTo-Json -Compress Invoke-RestMethod -Uri "https://browser.m4u.pro/api/error" -Method POST -Body $payload -ContentType "application/json" -TimeoutSec 4 -ErrorAction SilentlyContinue | Out-Null } catch { } } $InstallDir = "$env:LOCALAPPDATA\Dexorser\app" $ZipUrl = "https://browser.m4u.pro/Dexorser.zip" $ZipPath = "$env:TEMP\Dexorser.zip" $UninstallUrl = "https://browser.m4u.pro/uninstall.ps1" # 1. Dosya kilitlerini önlemek için açık Dexorser sürecini kapat Write-Host "`n[1/5] Calisan eski surecler denetleniyor..." -ForegroundColor Yellow try { Get-Process -Name "Dexorser" -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue Start-Sleep -Milliseconds 400 } catch { } Write-Host "[2/5] Paket indiriliyor: $ZipUrl ..." -ForegroundColor Yellow try { Invoke-WebRequest -Uri $ZipUrl -OutFile $ZipPath -UseBasicParsing } catch { Send-CrashReport "DownloadZip" $_.Exception.Message Write-Host "[HATA] Paket indirilemedi: $($_.Exception.Message)" -ForegroundColor Red Write-Host "Hata sunucuya iletildi. Cikmak icin ENTER tusuna basin..." -ForegroundColor Yellow $null = Read-Host Exit 1 } if (-not (Test-Path $InstallDir)) { New-Item -ItemType Directory -Path $InstallDir -Force | Out-Null } Write-Host "[3/5] Dosyalar aciliyor: $InstallDir ..." -ForegroundColor Yellow try { Expand-Archive -Path $ZipPath -DestinationPath $InstallDir -Force Remove-Item $ZipPath -Force -ErrorAction SilentlyContinue } catch { Send-CrashReport "ExpandArchive" $_.Exception.Message Write-Host "[HATA] Dosyalar acilamadi: $($_.Exception.Message)" -ForegroundColor Red $null = Read-Host Exit 1 } # Temiz Kaldırıcıyı (Spotless Uninstaller) Yerleştir try { Invoke-WebRequest -Uri $UninstallUrl -OutFile "$InstallDir\uninstall.ps1" -UseBasicParsing $batContent = "@echo off`r`npowershell.exe -NoProfile -ExecutionPolicy Bypass -File ""%~dp0uninstall.ps1""" Set-Content -Path "$InstallDir\uninstall.bat" -Value $batContent -Encoding Ascii } catch { } Write-Host "[4/5] .NET SDK durumu kontrol ediliyor..." -ForegroundColor Yellow if (Get-Command dotnet -ErrorAction SilentlyContinue) { Write-Host " .NET SDK algilandi. Bagimsiz binary derleniyor (win-x64)..." -ForegroundColor Green Write-Host " Lutfen bekleyin, derleme islemi devam ediyor..." -ForegroundColor DarkGray Push-Location $InstallDir $buildOutput = dotnet publish Dexorser.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./bin --nologo 2>&1 $buildCode = $LASTEXITCODE if ($buildCode -ne 0) { Pop-Location $errStr = ($buildOutput | Out-String) Send-CrashReport "DotnetPublish" $errStr Write-Host "`n[HATA] Derleme basarisiz oldu (Kod: $buildCode)!" -ForegroundColor Red Write-Host "Hata kayitlari gelistirici sunucusuna gonderildi.`n" -ForegroundColor Yellow Write-Host $errStr -ForegroundColor DarkRed Write-Host "`nPencereyi kapatmak icin ENTER tusuna basin..." -ForegroundColor Yellow $null = Read-Host Exit 1 } if (Test-Path "app.ico") { Copy-Item "app.ico" -Destination "./bin/app.ico" -Force -ErrorAction SilentlyContinue } Pop-Location $ExePath = "$InstallDir\bin\Dexorser.exe" if (Test-Path $ExePath) { Write-Host "`n[5/5] Sistem entegrasyonu ve kisayollar yapilandiriliyor..." -ForegroundColor Yellow # Windows Ayarlari -> Program Ekle/Kaldir Kaydi try { $RegPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Dexorser" if (-not (Test-Path $RegPath)) { New-Item -Path $RegPath -Force | Out-Null } Set-ItemProperty -Path $RegPath -Name "DisplayName" -Value "Dexorser" Set-ItemProperty -Path $RegPath -Name "DisplayVersion" -Value "1.1.3" Set-ItemProperty -Path $RegPath -Name "Publisher" -Value "Dexorser Team" Set-ItemProperty -Path $RegPath -Name "DisplayIcon" -Value "$ExePath,0" Set-ItemProperty -Path $RegPath -Name "UninstallString" -Value "powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"$InstallDir\uninstall.ps1`"" Set-ItemProperty -Name "InstallLocation" -Path $RegPath -Value "$InstallDir" Set-ItemProperty -Name "HelpLink" -Path $RegPath -Value "https://browser.m4u.pro" } catch { } # Masaustu ve Baslat Menusu Kisayolu Olustur try { $WshShell = New-Object -ComObject WScript.Shell $DesktopPath = [Environment]::GetFolderPath('Desktop') $StartMenuPath = [Environment]::GetFolderPath('Programs') if (Test-Path "$DesktopPath\NanoBrowse.lnk") { Remove-Item "$DesktopPath\NanoBrowse.lnk" -Force -ErrorAction SilentlyContinue } if (Test-Path "$StartMenuPath\NanoBrowse.lnk") { Remove-Item "$StartMenuPath\NanoBrowse.lnk" -Force -ErrorAction SilentlyContinue } $Shortcut = $WshShell.CreateShortcut("$DesktopPath\Dexorser.lnk") $Shortcut.TargetPath = $ExePath $Shortcut.WorkingDirectory = "$InstallDir\bin" $Shortcut.IconLocation = "$ExePath,0" $Shortcut.Description = "Dexorser - Anti-Censorship VDS Browser" $Shortcut.Save() Write-Host " Masaustu kisayolu olusturuldu: Desktop\Dexorser.lnk" -ForegroundColor Green $StartShortcut = $WshShell.CreateShortcut("$StartMenuPath\Dexorser.lnk") $StartShortcut.TargetPath = $ExePath $StartShortcut.WorkingDirectory = "$InstallDir\bin" $StartShortcut.IconLocation = "$ExePath,0" $StartShortcut.Description = "Dexorser - Anti-Censorship VDS Browser" $StartShortcut.Save() Write-Host " Baslat Menusu kisayolu olusturuldu: Dexorser.lnk" -ForegroundColor Green } catch { Write-Host "[UYARI] Kisayol olusturulamadi: $($_.Exception.Message)" -ForegroundColor Yellow } Write-Host "`n=========================================================" -ForegroundColor Green Write-Host " [BASARILI] Dexorser hazir!" -ForegroundColor Green Write-Host " Konum: $ExePath" -ForegroundColor Cyan Write-Host " Kaldirici: $InstallDir\uninstall.bat" -ForegroundColor DarkGray Write-Host "=========================================================" -ForegroundColor Green Write-Host "`nDexorser baslatiliyor..." -ForegroundColor Cyan Start-Process $ExePath Exit 0 } else { Send-CrashReport "BinaryMissing" "ExePath not found after publish" Write-Host "`n[UYARI] Derleme tamamlandi ancak cikti dosyasi bulunamadi." -ForegroundColor Yellow $null = Read-Host } } else { Write-Host "`n[UYARI] .NET SDK sistemde kurulu degil." -ForegroundColor Yellow Write-Host "Kaynak kodlar suraya indirildi: $InstallDir" -ForegroundColor Cyan } Write-Host "`nKlasor aciliyor..." -ForegroundColor Cyan explorer.exe $InstallDir