Created
April 2, 2020 15:36
-
-
Save asn-d6/99a936b0467b0cef88a677baaf0bbd04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Boxes that attacker has in her botnet | |
ATTACKER_BOXES = [5, 50, 100, 200, 300, 400, 500, 1000] | |
# Successful high-effort PoW the attacker produces per second | |
ATTACKER_SUCCESSES_PER_SEC = [1, 5, 10, 20, 30, 50] | |
print("Expected Time (in seconds) Per Successful High-Effort PoW\n") | |
print("\tSucceses\t\t1\t\t5\t\t10\t\t20\t\t30\t\t50\n") | |
for n_attacker_boxes in ATTACKER_BOXES: | |
print("\t%d\t\t\t" % n_attacker_boxes, end="") | |
for attacker_success_per_sec in ATTACKER_SUCCESSES_PER_SEC: | |
one_box_successes_per_second = attacker_success_per_sec / n_attacker_boxes | |
expected_time_to_success = 1 / one_box_successes_per_second | |
print("%d\t\t" % expected_time_to_success, end="") | |
# print("For %d boxes and %d successes per second: one box does %f successes in a second" % | |
# (n_attacker_boxes, attacker_success_per_sec, one_box_successes_per_second)) | |
print("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment