From b1a7fef63105e5201fa7b86d584fefb3cae2a91d Mon Sep 17 00:00:00 2001 From: Arnaud Morin Date: Thu, 24 Mar 2022 00:05:29 +0100 Subject: [PATCH] Add cipher/uncipher scripts Signed-off-by: Arnaud Morin --- terraform/training/files/cipher.sh | 6 ++++++ terraform/training/files/uncipher.sh | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100755 terraform/training/files/cipher.sh create mode 100755 terraform/training/files/uncipher.sh diff --git a/terraform/training/files/cipher.sh b/terraform/training/files/cipher.sh new file mode 100755 index 0000000..7e74a9d --- /dev/null +++ b/terraform/training/files/cipher.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +ls -1 *.tf | while read f ; do + echo "Ciiphering $f" + cat $f | gpg -e -r arnaud@mailops.fr -r arnaud.morin@gmail.com > $f.gpg +done diff --git a/terraform/training/files/uncipher.sh b/terraform/training/files/uncipher.sh new file mode 100755 index 0000000..a2a51a3 --- /dev/null +++ b/terraform/training/files/uncipher.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +ls -1 *.gpg | while read f ; do + echo "Unciphering $f" + n=${f%.gpg} + cat $f | gpg -d > $n +done