From ef7997e8e359962d8e56b275b2a19956b3a8d4a2 Mon Sep 17 00:00:00 2001 From: tangobravo14 Date: Wed, 3 Jan 2024 17:50:05 -0600 Subject: [PATCH] script for generating random arc4 keys used with anytone / motorola radios --- Files/arc4_keys.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 Files/arc4_keys.sh diff --git a/Files/arc4_keys.sh b/Files/arc4_keys.sh new file mode 100755 index 0000000..bf7fe6c --- /dev/null +++ b/Files/arc4_keys.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Number of keys to generate +num_keys=10 + +# Output file +output_file="arc4-keys.txt" + +echo "Generating $num_keys random ARC4 encryption keys of length 10 and saving to $output_file:" + +# Create an empty file or overwrite the existing one +> "$output_file" + +for ((i=1; i<=$num_keys; i++)); do + # Generate a random 10-character key using openssl + key=$(openssl rand -hex 5 | tr -d '\n') + + echo "Key $i: $key" >> "$output_file" +done + +echo "Keys have been saved to $output_file" +exit 0