From d022f9a8749f519da76c7ed9f5838ee871db2081 Mon Sep 17 00:00:00 2001 From: Brendan McDevitt Date: Sat, 15 Oct 2016 08:05:02 -0500 Subject: [PATCH] added .bash_functions file --- .bash_functions | 26 ++++++++++++++++++++++++++ README.md | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .bash_functions diff --git a/.bash_functions b/.bash_functions new file mode 100644 index 0000000..11a7895 --- /dev/null +++ b/.bash_functions @@ -0,0 +1,26 @@ +### list of functions to source ### + +randpw() +{ +openssl rand -base64 12 +} + +cipher_check() +{ +nmap --script ssl-enum-ciphers "$1" +} + +check_gzip() +{ +curl -I -H 'Accept-Encoding: gzip,deflate' "$1" 2> /dev/null | grep --color 'Content-Encoding' && 'echo gzip enabled' || echo 'gzip not enabled' +} + +ns() +{ +dig +short "$1" +} + +mx() +{ +dig +short MX "$1" +} diff --git a/README.md b/README.md index 38aa3b9..4e62acd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Source all of the files. Feel free to add to a script or just on cmd line - for DOTFILE in `find $HOME/.dotfiles` + for DOTFILE in `find $HOME/dotfiles` do [ -f “$DOTFILE” ] && source “$DOTFILE” done