diff --git a/noos-noarch/home/bryanpedini/bin/externalip b/noos-noarch/home/bryanpedini/bin/externalip new file mode 100755 index 0000000..2870944 --- /dev/null +++ b/noos-noarch/home/bryanpedini/bin/externalip @@ -0,0 +1,4 @@ +#!/bin/bash + +curl http://ipecho.net/plain +echo diff --git a/noos-noarch/home/bryanpedini/bin/ssh-fingerprint b/noos-noarch/home/bryanpedini/bin/ssh-fingerprint new file mode 100755 index 0000000..65e4dc6 --- /dev/null +++ b/noos-noarch/home/bryanpedini/bin/ssh-fingerprint @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +md5=false +key="" + +# command-line parameters +for prm in "$@"; do + if [ "${prm:0:1}" == "-" ]; then + if [ "$prm" == "-5" ] || [ "$prm" == "--md5" ]; then + md5=true + fi + else + key="$prm" + fi +done + +if [ "$key" == "" ]; then echo "Usage: $0 [ -5 | --md5 ] "; exit 1; fi + +if [ "$md5" == true ]; then + ssh-keygen -E md5 -lf "$key" +else + ssh-keygen -lf "$key" +fi