Skip to content

Commit

Permalink
Merge branch 'master' of github.com:peass-ng/PEASS-ng
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospolop committed Oct 2, 2024
2 parents 8dfa0ef + a5ce3f9 commit 003b389
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions winPEAS/winPEASps1/winPEAS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1239,16 +1239,14 @@ Get-SmbShare | Get-SmbShareAccess | ForEach-Object {
Write-Host ""
if ($TimeStamp) { TimeElapsed }
Write-Host -ForegroundColor Blue "=========|| USER INFO"
Write-Host "== || Generating List of all Administrators, Users and Backup Operators (if any exist)"

@("ADMINISTRATORS", "USERS") | ForEach-Object {
Write-Host $_
Write-Host "-------"
Start-Process net -ArgumentList "localgroup $_" -Wait -NoNewWindow
}
Write-Host "BACKUP OPERATORS"
Write-Host "-------"
Start-Process net -ArgumentList 'localgroup "Backup Operators"' -Wait -NoNewWindow
Write-Host "== || Generating List of all Local Administrators, Users and Backup Operators (if any exist)"

# Code has been modified to accomodate for any language by filtering only on the output and not looking for a string of text
# Foreach loop to get all local groups, then examine each group's members.
Get-LocalGroup | ForEach-Object {
"`n Group: $($_.Name) `n" ; if(Get-LocalGroupMember -name $_.Name){
(Get-LocalGroupMember -name $_.Name).Name}
else{" {GROUP EMPTY}"}}


Write-Host ""
Expand Down

0 comments on commit 003b389

Please sign in to comment.