From f2951e8d8bf85ea51a0fd8a8e34dfea37d207776 Mon Sep 17 00:00:00 2001 From: xZero707 Date: Fri, 24 May 2024 00:27:14 +0200 Subject: [PATCH] Add helper scripts for generating WordPress salts --- bin/generate-wp-salts | 1 + src/wp-utils/wp-generate-salt | 7 +++++++ src/wp-utils/wp-generate-salts | 14 ++++++++++++++ 3 files changed, 22 insertions(+) create mode 120000 bin/generate-wp-salts create mode 100755 src/wp-utils/wp-generate-salt create mode 100755 src/wp-utils/wp-generate-salts diff --git a/bin/generate-wp-salts b/bin/generate-wp-salts new file mode 120000 index 0000000..8124e82 --- /dev/null +++ b/bin/generate-wp-salts @@ -0,0 +1 @@ +../src/wp-utils/wp-generate-salts \ No newline at end of file diff --git a/src/wp-utils/wp-generate-salt b/src/wp-utils/wp-generate-salt new file mode 100755 index 0000000..b1fb1c8 --- /dev/null +++ b/src/wp-utils/wp-generate-salt @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +main() { + local length="${1:?}" + tr -dc 'a-zA-Z0-9!@#$%^&*()-=_+[]{};:,.<>?`~'