Hello frens.
Hopefully this title gives you some pause. Can YOU make a million dollar cyber SaaS product? With enough knowledge and basics, absolutely, and this is how it’s going to start.
First, what is a Daemon? Is that spelled wrong? Isn’t it demon?
It can be pronounced with or without the “a”, but a daemon is simply a program that runs in the background. Congratulations, you now understand daemons.
As opposed to what? Something that runs in the foreground. Something that you have to run in the terminal, like if you wanted to run your python scripts manually (which most are made for that).
But what if we wanted something to run all the time? What would an example of that be? Say we made a deception engine, or a program that queries our database for new data to determine if an alert needs to be created, or a script that if something happens spontaneously, we can react to it with automation? All of these are made with daemons and it’s actually quite simple with a few tricks to make it bulletproof.
Today we’re going to go over two key concepts: Writing Daemons and Managing Daemons.
Our daemons will be written with Python, but a daemon can be in any language (including Ba$h scripting if you’re into that kind of thing). I’m much more of a loop in Python and use os.system guy myself, but that’s because my bash skills are not up to snuff (and no one cares).
So let’s look at an example Python daemon I made named python_daemon.py:
I’ve already explained everything in here at least once in my foundations of Python so here are the key takeaways: