Skip to content

Commit

Permalink
Added stalking protection
Browse files Browse the repository at this point in the history
  • Loading branch information
dchristl committed Jan 27, 2023
1 parent 0ff135b commit 9268323
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions webserver/generate_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,22 @@ def sha256(data):
'-y', '--yaml', help='yaml file where to write the list of generated keys')
parser.add_argument(
'-v', '--verbose', help='print keys as they are generated', action="store_true")
parser.add_argument(

'-tinfs', '--thisisnotforstalking', help=argparse.SUPPRESS)

args = parser.parse_args()

MAX_KEYS = 1

if args.nkeys < 1 or args.nkeys > 100:
if (args.thisisnotforstalking == 'i_agree'):
MAX_KEYS = 100


if args.nkeys < 1 or args.nkeys > MAX_KEYS:
raise argparse.ArgumentTypeError(
"Number of keys out of range (between 1 and 100)")
"Number of keys out of range (between 1 and " + str(MAX_KEYS) + ")")


current_directory = os.getcwd()
final_directory = os.path.join(current_directory, OUTPUT_FOLDER)
Expand Down

0 comments on commit 9268323

Please sign in to comment.