#28 Fix Portscan.py default case

Unito
carlos.garcia ha unito 1 commit da stefan.schmidt/fix-portscan-offbyone a SPIN/master 6 anni fa
Stefan Schmidt ha commentato 6 anni fa

As briefly discussed in the meeting, the default case (when not specifying any parameters) in the portscan-attack only scanned 891 ports instead of the 1000 it was supposed to. The problems I found are two off-by-one errors in line 101 and 102: when using range(0,9) the generated numbers don't include the nine, the same goes for the array slicing. This resulted in 9*99=891 packets being generated instead of 1000.

As briefly discussed in the meeting, the default case (when not specifying any parameters) in the portscan-attack only scanned 891 ports instead of the 1000 it was supposed to. The problems I found are two off-by-one errors in line 101 and 102: when using range(0,9) the generated numbers don't include the nine, the same goes for the array slicing. This resulted in 9*99=891 packets being generated instead of 1000.
Questo contributo è stato incluso con successo!
Sign in to join this conversation.
Nessuna etichetta
Bug
Nessuna milestone
Nessun assegnatario
1 Partecipanti
Caricamento...
Annulla
Salva
Non ci sono ancora contenuti.