script for generating random arc4 keys used with anytone / motorola radios

This commit is contained in:
tangobravo14
2024-01-03 17:50:05 -06:00
parent fa5af7b3ac
commit ef7997e8e3
+22
View File
@@ -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