To start describing this program, we need a bit of a backstory. It’s a little depressing, and substandard for what I normally share, but I feel it is important.
Let’s talk nuclear war. While the issue of nuclear war has been somewhat forgotten in today’s culture, the threat is still a very real one. The Bulletin of Atomic Scientists created the doomsday clock in 1947, a symbolic clock updated in January of each year that represents how close the scientists believe mankind is to a doomsday event. The closer to midnight, the worse these scientist things are. In 1991, scientists rated the world “17 minutes from midnight.” Today, the clock is set to just 100 seconds from midnight, the Bulletin citing the threat of nuclear war as their primary concern.
Don’t go running to the hills just yet. The clock’s purpose is not to warn citizens of impending doom, but to alert the scientific community that change must occur. Nonetheless, it is a good example of how nuclear war is still an active and important threat.
Another important thing to note, is that while Hollywood would have you believe that a nuke landing in your country would be the end of all life, nukes are much more localized than that. Unless you are within some 15 miles of where a nuke hits, it is very likely that, with proper prep and precaution, one can survive an isolated event. There are other concerns with nuclear war. Mutually assured destruction is the concept many countries use as a defense against nuclear war. When a nuclear attack is detected, the victim sends all of its nukes at the attacker as well, assuring both sides loose. If multiple countries retaliate and all sides send all of their nukes, it could destroy our atmosphere. Hopefully our world leaders would recognize that this is not a viable response.
But I hear you saying, this website isn’t for preppers or scientists, it’s for batch coders. Why are we talking about nuclear war? Bear with me, I’m getting there, I promise.
While the doomsday clock is updated yearly and is not intended to alert of immediate danger, the DEFCON Warning System established in 1984 is. Modeled after the U.S. Pentagon’s own DEFCON system, the DWS is a service meant to alert the general population of nuclear threats. The system has a 5 stage alert process, with 5 being all clear and 1 meaning that a nuclear attack is in progress or is considered to be highly likely. You can (and should) read about it here.
This system is not perfect, but is the best option to monitor the situation. Today’s highlighted program monitors this system and updates the user as needed.
The DEFCON Listener queries the website using winhttpjs, grabbing the current status and reacting based on said status. It can easily be set to run in the background with no indication it is there unless there is an update to the world theatre (this is done by adding a file called DontDisplayOnStartup.config to the program’s directory).
Whenever the level changes, an audible alert is sounded with a window displaying the status of the DWS, prompting the user to visit the website to read more. If the level goes down to one, it will turn up the volume using jscript (to make sure you hear the alert) and play the alert until you close the program. It will also read the DEFCON status out loud for both DEFCON two and one. It makes sure duplicate windows do not exist using CMDS.
The installation is simple. Just download the program and its files and save them to your appdata, documents, or wherever you would like as long as it does not require admin access to write to the directory.
Simply download the latest release from the link below, and extract the files. Take the folder and place it somewhere in which it will be convenient to leave running. Run the script by running the
If you want the script to run on startup, simply put a shortcut file pointing to
shell:startup. To do this, right click the
DefconWarningSystemLauncher.vbs file and click “copy.”
Then, either in a run dialogue or in File Explorer, type in
shell:startup. This will bring you to the startup folder on your computer. Here, right click some empty space in the folder and select “Paste Shortcut.”
You can also use the task scheduler to run the
vbs file mentioned above automatically. Whatever floats your boat!
By default, DFW will tell you the status every time you start your machine. You have the option of hiding the status window unless the DEFCON level is below 5 by adding the file
DontDisplayOnStartup.config to the installation directory.
Here is an in-depth preview of the program and its alerts:
The program itself is fully open source. It depends on the following files which are also open source:
- Volume up jscript tool by foxdrive: https://stackoverflow.com/a/22895700/7872447 used to turn up the volume
- Wscript Audio player by SachaDee: https://stackoverflow.com/a/23316395/7872447 used to make an alert sound
- Alert.Wav from Defcon Warning System: https://defconwarningsystem.com/ used to make an alert sound
- Winhttpjs.bat (soon to be replaced by curl) by npockmaka: https://github.com/npocmaka/batch.scripts/blob/master/hybrids/jscript/winhttpjs.bat used to query status
- CMDS.bat by ITCMD https://github.com/ITCMD/CMDS
- New Feature: No longer plays audible alert of defcon 4 or 3 on first launch of system.
- Bug Fix: Deletes Version File upon Checking Software Version
- Bug Fix: Typo Fixes
60 total downloads.