Skip to content

Craig88/christmas-logic-bomb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Christmas Logic Bomb 🎄 💣

A simple "logic bomb" written in Python that displays a festive greeting on Christmas Day.

In winter 1987, a German student created one of the earliest examples of a computer worm - a computer program designed to spread itself across systems. The program, known as "CHRISTMAS EXEC" displayed a ASCII art picture of a Christmas Tree alongside a cheerful message, and then emailed itself to all the user's contacts. Since then, many other programs have used Christmas greetings as a cover for malicious activity.

This example program uses Christmas Day (25 December) as the trigger for a logic bomb. A logic bomb is when code is added to a program to check if a certain condition is met. If the condition is true it runs another section of code which can have a destructive or damaging effect.

Thankfully, this example is completely safe - it checks to see if it's Christmas Day, and if so displays a festive greeting. Nothing is deleted, and it doesn't try copy itself to other computers.

Live code example

Try running the code: Live Demo

Explore the code

Things to try...

  1. Try running the code using the live link
  2. Currently the bomb is triggered on Christmas Day, try changing the code so it is triggered on today's date
  3. Try changing the message that is displayed when the bomb is triggered
  4. Add in other target dates and display relevant messages on those dates (for example New Year's Day, Halloween, St Valentine's Day)

Built with

Useful references


Craig Steele cr@igsteele.com
join Craig's Digital Skills Newsletter

About

A simple "logic bomb" written in Python that displays a festive greeting on Christmas Day.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages