Masked input

Posted by Fearless on Tue 14 May 2024 01:20 AM — 2 posts, 6,946 views.

#0
This is a LUA alias for a (mostly) masked input prompt. The text will be sent to the server and it will not show in the command history.

If Webdings size 4 isn't visibly obfuscated enough for you, then either 1: make the box smaller (box_height) so that the input field is not visible at all, or 2: get a password font, like this: https://github.com/davidagraf/passwd/blob/master/public/ttf/password.ttf (I am not affiliated. Beware of license trolls.)

<aliases>
  <alias
   match="pw"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>pw = utils.inputbox(
  "Type password:", "", "", "Webdings", 4,
  {box_width=180, box_height=270}
)
pw = pw or ""
if pw ~= "" then Send(pw) end</send>
  </alias>
</aliases>
USA Global Moderator #1
Very nice. You should probably use SendNoEcho instead of Send.

https://www.mushclient.com/scripts/doc.php?function=SendNoEcho