Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- ddosed = 0
- notddosed = 0
- for a in range(1, 100000): # let's do 100000 samples
- selected_an_attacker = False
- for b in range(0, 10): #select ten masternodes
- if randint(0,1000) >= 990: #last ten are attackers
- selected_an_attacker = True
- if selected_an_attacker:
- ddosed += 1
- else:
- notddosed += 1
- print ddosed, notddosed
- ---- output ---
- 10588 89411
- 10443 89556
- 10481 89518
- 10460 89539
- 10502 89497
- 10475 89524
- 10528 89471
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement