Skip to content

🔑 A simple Lua program which can pipe stdin to stdout as triad of masked text (e.g. for a password), plain text and number of characters.

License

Notifications You must be signed in to change notification settings

stpettersens/ppwd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ppwd

print password

A simple Lua program which can pipe stdin to stdout as triad of masked text (e.g. for a password), plain text and number of characters. e.g.

 shell> echo "foobar" | ppwd
 ******|foobar|6

Usage example (Shellscript):

# Use ppwd with awk to obtain the masked text and plain text for use in other processes.
ppwd=`echo "hello_world" | ppwd`
masked=`echo "$ppwd" | awk '{split($0,mpl,"|")} END{print mpl[1]}'`
# Where 1 is the index for the masked text.
plain=`echo "$ppwd" | awk '{split($0,mpl,"|")} END{print mpl[2]}'`
# Where 2 is the index for the plain text; use 3 for number of characters.

Build (produces Lua bytecode)

make

Install Lua bytecode + shell wrapper (to /usr/local/bin on Unix-like system):

[sudo] make install

Install as executable Lua source, not bytecode:

[sudo] make srcexec

About

🔑 A simple Lua program which can pipe stdin to stdout as triad of masked text (e.g. for a password), plain text and number of characters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published