From 22e85a833ad54a0eb91b39c2a9da4c65ab8bef72 Mon Sep 17 00:00:00 2001 From: Scott Sutherland Date: Thu, 18 Jul 2024 15:30:09 -0500 Subject: [PATCH] Update PowerHuntShares.psm1 Small bug fix. --- PowerHuntShares.psm1 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/PowerHuntShares.psm1 b/PowerHuntShares.psm1 index 171baa6..98d3e7f 100644 --- a/PowerHuntShares.psm1 +++ b/PowerHuntShares.psm1 @@ -4,7 +4,7 @@ #-------------------------------------- # Author: Scott Sutherland, 2024 NetSPI # License: 3-clause BSD -# Version: v1.75 +# Version: v1.76 # 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 { @@ -1548,12 +1548,14 @@ function Invoke-HuntSMBShares } # Estimate report generation time - If($AllSMBSharesCount -le 500 ) {$ReportGenTimeEstimate = "1 minute or less" } - If($AllSMBSharesCount -ge 1000 ) {$ReportGenTimeEstimate = "3 minute or less" } - If($AllSMBSharesCount -ge 2000 ) {$ReportGenTimeEstimate = "5 minute or less" } - If($AllSMBSharesCount -ge 10000 ) {$ReportGenTimeEstimate = "10 minute or less"} - If($AllSMBSharesCount -ge 15000 ) {$ReportGenTimeEstimate = "15 minute or less"} - If($AllSMBSharesCount -ge 30000 ) {$ReportGenTimeEstimate = "20 minute or less"} + $ReportGenTimeEstimate = "Unknown" + If($AllSMBSharesCount -le 500 ) {$ReportGenTimeEstimate = "1 minute or less" } + If($AllSMBSharesCount -gt 500 ) {$ReportGenTimeEstimate = "5 minutes or less" } + If($AllSMBSharesCount -ge 1000 ) {$ReportGenTimeEstimate = "10 minutes or less" } + If($AllSMBSharesCount -ge 2000 ) {$ReportGenTimeEstimate = "15 minutes or less" } + If($AllSMBSharesCount -ge 10000 ) {$ReportGenTimeEstimate = "20 minutes or less" } + If($AllSMBSharesCount -ge 15000 ) {$ReportGenTimeEstimate = "25 minutes or less" } + If($AllSMBSharesCount -ge 30000 ) {$ReportGenTimeEstimate = "30 minutes or less" } Write-Output " [*] -----------------------------------------------" Write-Output " [*][$Time] - Generating HTML Report"