BornToBeRoot / BornToBeRoot/PowerShell_IPv4PortScanner

[Feature Request] Catch Exception from calling EndInvoke and recommend/dynamically reducing Threads

未關閉
#5 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement help wanted
主要語言
PowerShell
星號
243
分支
59
PR 合併指標
30 天內沒有已合併 PR

描述

This is a feature request to add dynamic Thread reduction when `EndInvoke` function causes any kind of exception. Otherwise, exit early with a message to recommend for the -Threads parameter to be used.

Specifically this error that I ran into because the default 500 threads is too high for my virtual lab:
```
Exception calling "EndInvoke" with "1" argument(s): "Thread failed to start."
At C:\temp\IPv4PortScan.ps1:260 char:13
+ $Job_Result = $Job.Pipe.EndInvoke($Job.Result)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ThreadStartException

Exception calling "EndInvoke" with "1" argument(s): "Thread is running or terminated; it cannot restart."
```

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

從 C:\temp\IPv4PortScan.ps1 的第 260 行附近開始,查看 $Job.Pipe.EndInvoke($Job.Result) 引發所回報例外的位置,並追蹤 -Threads 參數如何控制工作建立。確定失敗應如何減少執行緒數量或產生提前建議,然後根據顯示的兩個 EndInvoke 錯誤驗證行為。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
powershell
領域
cli, networking
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。