mirror of
https://github.com/NetSPI/PowerHuntShares.git
synced 2025-05-05 03:38:42 +02:00
Update PowerHuntShares.psm1
Add unique share name count to folder group summary page.
This commit is contained in:
parent
933d69a67f
commit
0830a520f8
@ -4,7 +4,7 @@
|
|||||||
#--------------------------------------
|
#--------------------------------------
|
||||||
# Author: Scott Sutherland, 2024 NetSPI
|
# Author: Scott Sutherland, 2024 NetSPI
|
||||||
# License: 3-clause BSD
|
# License: 3-clause BSD
|
||||||
# Version: v1.71
|
# Version: v1.72
|
||||||
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
|
# References: This script includes custom code and code taken and modified from the open source projects PowerView, Invoke-Ping, and Invoke-Parrell.
|
||||||
function Invoke-HuntSMBShares
|
function Invoke-HuntSMBShares
|
||||||
{
|
{
|
||||||
@ -1579,10 +1579,11 @@ function Invoke-HuntSMBShares
|
|||||||
$ThisFileCount = $ThisFileBars.FileCount
|
$ThisFileCount = $ThisFileBars.FileCount
|
||||||
$ThisFileShareCount = $ThisFileBars.Sharecount
|
$ThisFileShareCount = $ThisFileBars.Sharecount
|
||||||
$ThisFileShareNameList = $ExcessiveSharePrivs | where FileListGroup -eq $FileGroupName | select ShareName -unique -expandproperty sharename | foreach { "$_ <br>"}
|
$ThisFileShareNameList = $ExcessiveSharePrivs | where FileListGroup -eq $FileGroupName | select ShareName -unique -expandproperty sharename | foreach { "$_ <br>"}
|
||||||
|
$ThisFileShareNameListUniqueCount = $ThisFileShareNameList | measure | select count -ExpandProperty count
|
||||||
$ThisRow = @"
|
$ThisRow = @"
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<button class="collapsible">$ThisFileShareCount</button>
|
<button class="collapsible">$ThisFileShareNameListUniqueCount</button>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="filelist" >
|
<div class="filelist" >
|
||||||
$ThisFileShareNameList
|
$ThisFileShareNameList
|
||||||
@ -1590,6 +1591,9 @@ function Invoke-HuntSMBShares
|
|||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
$ThisFileShareCount
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
$FileGroupName
|
$FileGroupName
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@ -5158,7 +5162,8 @@ Folder groups are SMB shares that contain the exact same file listing. Each file
|
|||||||
<table class="table table-striped table-hover tabledrop">
|
<table class="table table-striped table-hover tabledrop">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th align="left">Affected Shares</th>
|
<th align="left">Unique Share Name Count</th>
|
||||||
|
<th align="left">Affected Share Count</th>
|
||||||
<th align="left">File Group</th>
|
<th align="left">File Group</th>
|
||||||
<th align="left">File Count</th>
|
<th align="left">File Count</th>
|
||||||
<th align="left">Affected Computers</th>
|
<th align="left">Affected Computers</th>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user