I initiated the Zant project to enhance my proficiency in Python while creating a tool to notify someone about an emergency. Zant, derived from the word 'cognizant' is versatile, able to notify someone about emergencies ranging from severe weather events to global catastrophes. It functions by analyzing various indicators and will be programmed to assess severity based on the returned data. There are currently three fully operational modules, with one nearing completion.

The Internet module is almost done and conducts ICMP pings on a list of IP addresses in every state. If a ping is returned, it indicates that the node is reachable and operational. Given the critical role of the internet in our infrastructure, a large-scale outage could have catastrophic consequences. I constructed this module by utilizing Shodan requests with 'country:US, state:{state}' as the query. The obtained results are stored, and a separate method loads these IP addresses to construct the final list for future checks. Initially, I planned to check five IPs per state, but I will increase this to 25 as it won't significantly increase processing time. The initial method I devised to ping an IP address involved sending a packet count and tallying the number received. With the intention to analyze 255 IPs (five per state in 50 states, plus DC), I created new methods to asynchronously ping IPs. The ping_ip_list method accepts a dictionary of states containing IP address lists and pings those IPs asynchronously. I still need to develop logic to manage IP address cycling, as some may become naturally unreachable over time.

Another crucial indicator to monitor is the number of power outages. This is achieved by sending a web request to power grids in nine states nationwide. The response includes details of each grid checked and the reported outage numbers at that moment. This module was the first one I developed and requires the most significant overhaul.

The simplest module but with potentially disastrous consequences if activated is related to coronal mass ejections (CMEs). In 1859, astronomer Richard Carrington witnessed a CME erupting from the sun. Around 16 hours later, an unusual solar storm hit the Earth, leading to telegraph operator shocks, fires, and the aurora borealis being visible in both hemispheres. Despite the paranoia among preppers, this event is inevitable in the near future. The NOAA has an alert system for CMEs, and this method checks that for severe storms. A Carrington-like storm occurred in 2012 but narrowly missed affecting us due to a nine-day difference in solar rotation.

The SIM7600 is a HAT that connects to the Raspberry Pi, providing GNSS and 4G cellular capabilities. Zant is designed to run on a Raspberry Pi to utilize this for obtaining information on four GNSS constellations (GPS, BEIDOU, GALILEO, GLONASS). GPS dependency is so high that even ATMs require it to function. This module sends commands to the SIM7600 HAT, retrieves GNSS data, and compiles a dictionary with the number of satellites in range for each constellation. While operational, this module needs refinement by removing unnecessary components and renaming. The SIM7600 documentation was inadequate, making it challenging to extract the required data. It was the first time I found practical use for my knowledge of binary outside subnetting.