From d3c79596d15feb7d3c435636535fa6911df0f96e Mon Sep 17 00:00:00 2001 From: tslil clingman <> Date: Tue, 9 Apr 2019 10:28:33 -0400 Subject: SSH key juggling --- badpass | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100755 badpass (limited to 'badpass') diff --git a/badpass b/badpass new file mode 100755 index 0000000..6a350cf --- /dev/null +++ b/badpass @@ -0,0 +1,42 @@ +#!/bin/sh + +# Requires expect + +PREFIX="THIS IS TOTALLY SUPER SECRET" +PHRASE="THIS IS TOTALLY SUPER SECRET" + +# Supress echo, and trap exit for correct restoration +stty -echo +trap 'stty echo' EXIT + +# Read without processing at all +IFS="" +read -r MASTER + +# Restore state +stty echo +trap - EXIT + +USEECHO () { + echo $1 $2 +} + +USEKEYCHAIN () { + expect - <