BornToBeRoot / BornToBeRoot/PowerShell_IPv4PortScanner
[Feature Request] Catch Exception from calling EndInvoke and recommend/dynamically reducing Threads
- Langage dominant
- PowerShell
- Étoiles
- 243
- Forks
- 59
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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."
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez dans C:\temp\IPv4PortScan.ps1, vers la ligne 260, où $Job.Pipe.EndInvoke($Job.Result) déclenche les exceptions signalées, et suivez la manière dont le paramètre -Threads contrôle la création des tâches. Déterminez comment les échecs devraient réduire le nombre de threads ou produire une recommandation précoce, puis vérifiez le comportement avec les deux erreurs EndInvoke affichées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- powershell
- Domaine
- cli, networking
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100