Skip to content

Instantly share code, notes, and snippets.

@nuryslyrt
Last active November 24, 2021 19:47
Show Gist options
  • Save nuryslyrt/b43698bdeb2873ec0e8a8be7a87e455d to your computer and use it in GitHub Desktop.
Save nuryslyrt/b43698bdeb2873ec0e8a8be7a87e455d to your computer and use it in GitHub Desktop.

Revisions

  1. nuryslyrt revised this gist Jan 31, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion EveryoneAccessCheck.ps1
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    $Shares = Get-ChildItem "C:\test123" -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone"} | %{($_.PSPath -split '::')[1]};
    foreach($Share in $Shares) {
    findstr /s "pass" $Share;
    findstr /r "[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*" $Share;
    findstr /rs "pass" $Share;
    }
  2. nuryslyrt revised this gist Jan 31, 2020. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion EveryoneAccessCheck.ps1
    Original file line number Diff line number Diff line change
    @@ -1 +1,4 @@
    Get-ChildItem C:\test123 -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone"} | %{($_.PSPath -split '::')[1]}
    $Shares = Get-ChildItem "C:\test123" -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone"} | %{($_.PSPath -split '::')[1]};
    foreach($Share in $Shares) {
    findstr /s "pass" $Share;
    }
  3. nuryslyrt created this gist Jan 31, 2020.
    1 change: 1 addition & 0 deletions EveryoneAccessCheck.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Get-ChildItem C:\test123 -Recurse | Get-ACL | ?{$_.AccessToString -match "Everyone"} | %{($_.PSPath -split '::')[1]}