Skip to content

Commit

Permalink
Update Amnesiac.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo4j authored Dec 6, 2023
1 parent 7befe2e commit 216ba3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Amnesiac.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4327,7 +4327,7 @@ function Get-Command {

elseif ($Command -eq "Process") {
$predefinedCommands = @(
'$isAdmin = ([System.Security.Principal.WindowsPrincipal][System.Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator);if($isAdmin){Write-Output "";Write-Output "[+] Processes sorted by ProcessName:";Get-Process -IncludeUserName | Select ID, ProcessName, SessionId, UserName, Path | Sort ProcessName | ft -Autosize | Out-String -Width 4096;Write-Output "[+] Processes sorted by Username:";Get-Process -IncludeUserName | Select ID, ProcessName, SessionId, UserName, Path | Sort UserName,ProcessName | ft -Autosize | Out-String -Width 4096;Write-Output "[+] Current Process:";Get-Process -IncludeUserName | Where-Object { $_.Id -eq $PID } | Select ID, ProcessName, SessionId, UserName, Path | Sort ID | Format-Table -AutoSize | Out-String -Width 4096}else{Write-Output "";Write-Output "[+] Processes sorted by PID:";Get-Process | Select ID, ProcessName, SessionId, Path | Sort ID | ft -Autosize | Out-String -Width 4096;Write-Output "[+] Current Process:";Get-Process | Where-Object { $_.Id -eq $PID } | Select ID, ProcessName, SessionId, Path | Format-Table -AutoSize | Out-String -Width 4096}#'
'$isAdmin = ([System.Security.Principal.WindowsPrincipal][System.Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator);$Isx64 = [System.Environment]::Is64BitProcess;if($isAdmin){Write-Output "";Write-Output "[+] Processes sorted by ProcessName:";Get-Process -IncludeUserName | Select ID, ProcessName, SessionId, UserName, Path | Sort ProcessName | ft -Autosize | Out-String -Width 4096;Write-Output "[+] Processes sorted by Username:";Get-Process -IncludeUserName | Select ID, ProcessName, SessionId, UserName, Path | Sort UserName,ProcessName | ft -Autosize | Out-String -Width 4096;if($Isx64){Write-Output "[+] Current Process [x64]:"}else{Write-Output "[+] Current Process [x86]:"};Get-Process -IncludeUserName | Where-Object { $_.Id -eq $PID } | Select ID, ProcessName, SessionId, UserName, Path | Sort ID | Format-Table -AutoSize | Out-String -Width 4096}else{Write-Output "";Write-Output "[+] Processes sorted by PID:";Get-Process | Select ID, ProcessName, SessionId, Path | Sort ID | ft -Autosize | Out-String -Width 4096;if($Isx64){Write-Output "[+] Current Process [x64]:"}else{Write-Output "[+] Current Process [x86]:"};Get-Process | Where-Object { $_.Id -eq $PID } | Select ID, ProcessName, SessionId, Path | Format-Table -AutoSize | Out-String -Width 4096}#'
)
}

Expand Down

0 comments on commit 216ba3a

Please sign in to comment.