Skip to content

Instantly share code, notes, and snippets.

View reard3n's full-sized avatar

David Gibbons reard3n

  • Pennsylvania, USA
View GitHub Profile
#!/bin/bash
while true
do
touch /tmp/csv.output
top -b -n1 | grep -A3 PID | grep -v PID | awk '{print $9","$10","$12}' > /tmp/procs
while read line
do
CSV=`hostname`
DATE=`date +%s`
@reard3n
reard3n / vaultCACertTest.sh
Created March 8, 2019 14:55
This gist is a quick-and-dirty bash script, designed for OS X Darwin, that will complete a working proof-of-concept TLS certificate auth against a HashiCorp vault binary
#!/bin/bash
# credit to @v6 (https://github.com/v6) for the gist this grew from
VAULTFQDN=vault.testdomain.local
USERNAME=davesusername
# Figure out what the latest version of vault is. This script only works on OS X right now, so don't worry about architecture.
VAULTLATESTDIR=`curl -s https://releases.hashicorp.com/vault/ | grep href | grep -v - | grep -v "\.\." | head -n1 | awk -F"\"" '{print $2}'`
VAULTLATESTBIN=`curl -s https://releases.hashicorp.com/vault/ | grep href | grep -v - | grep -v "\.\." | head -n1 | awk -F">" '{print $2}' | awk -F"<" '{print $1}'`
echo "Latest version directory is $VAULTLATESTDIR"

Keybase proof

I hereby claim:

  • I am reard3n on github.
  • I am reard3n (https://keybase.io/reard3n) on keybase.
  • I have a public key ASC6cE1BNbbkpJFQPwBdeMDZ9qjfa8h5fZv6UarNk8sZRAo

To claim this, I am signing this object: