Advertisement
FlyFar

ChristmasBomb - A Logic Bomb that is triggered on Christmas Day

Jun 28th, 2023
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | Cybersecurity | 0 0
  1. from datetime import date
  2.  
  3. today = date.today()
  4. target = date(today.year, 12, 25)
  5.  
  6.  
  7. def show_message():
  8.     theTree = [0, 0, 1, 1, 3, 5, 7, 9, 13, 7,
  9.               11, 15, 19, 11, 15, 19, 11, 15,
  10.               19, 23, 27, 6, 6, 6, 0]
  11.  
  12.     for row in theTree:
  13.         gap_size = int((14 - (0.5 * (row + 1))))
  14.         print(" " * gap_size + "*" * row)
  15.     print(">>>>> MERRY CHRISTMAS <<<<<")
  16.     print(" ")
  17.     exit()
  18.  
  19.  
  20. def bomb():
  21.     if (today == target):
  22.         show_message()
  23.  
  24.  
  25. print("Running program as normal...")
  26. bomb()
  27. print("Nothing to see here...")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement