vinitshahdeo/PortScanner

[BUG] Duplicate generated ports causing infinite loop

Offen

#70 geöffnet am 17.08.2020

 (3 Kommentare) (0 Reaktionen) (2 zugewiesene Personen)Python (122 Forks)auto 404
CH20bugeasyhacktoberfest

Repository-Metriken

Stars
 (150 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Describe the bug

The random ports generated in /server/utils/randomNum.js will have to pass duplicate port numbers to /server/index.js when high - low < countofPorts. This renders index.js file to enter infinite loop.

To Reproduce

Steps to reproduce the behavior:

  1. Go to /
  2. Edit config.json for range.high-range.low < count .
  3. Open terminal and run npm start
  4. See error (infinite loop)

Expected behavior

If the provided range is less than countofPorts, show error and display a message.

Contributor Guide