Skip to content

Instantly share code, notes, and snippets.

@arjvik
Created January 1, 2020 22:16
Show Gist options
  • Save arjvik/3a17007022a79280508408c831bf39fd to your computer and use it in GitHub Desktop.
Save arjvik/3a17007022a79280508408c831bf39fd to your computer and use it in GitHub Desktop.
Read in a password (or other text) one character at a time in the worst way possible
#!/bin/bash
x=""
while [[ "$x" != "password" ]]; do
in=`echo "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,<" |
rofi -sep ',' -l 1 -columns 27 -dmenu -p "$x" -only-match`
if [[ "$in" == "<" ]]; then
x="${x:0:-1}"
else
x="$x$in"
fi
done
rofi -dmenu -l 0 -p '!' -filter "Password Correct"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment