vinitshahdeo/PortScanner

[BUG] Duplicate generated ports causing infinite loop

Aberta

#70 aberto em 17 de ago. de 2020

 (3 comentários) (0 reação) (2 responsáveis)Python (122 forks)auto 404
CH20bugeasyhacktoberfest

Métricas do repositório

Stars
 (150 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador