From 3d90b2916d429e25e9c9706aba0890e8fa3a3154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Bry=C5=82kowski?= Date: Sat, 16 Jul 2022 17:13:35 +0100 Subject: [PATCH] tip is picked at random --- pwndbg/tips.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pwndbg/tips.py b/pwndbg/tips.py index 157a2ee60..ca532ebaf 100644 --- a/pwndbg/tips.py +++ b/pwndbg/tips.py @@ -1,5 +1,4 @@ -from datetime import datetime -from hashlib import md5 +from random import choice TIPS = [ "Don't eat yellow snow", @@ -8,8 +7,4 @@ TIPS = [ def get_tip_of_the_day() -> str: - day_since_epoch = (datetime.utcnow() - datetime(1970, 1, 1)).days - hash_of_the_day = md5(day_since_epoch.to_bytes(8, 'big', )).hexdigest() - tip_chosen = int(hash_of_the_day, 16) % len(TIPS) - return TIPS[tip_chosen] - + return choice(TIPS)