I’m looking for the ANSI escape codes for password masking to send from the server to a telnet client.
I’ve looked around quite a bit and I’m either not sending a sequence correctly or I don’t have the correct codes.
I have full color support and some special characters, just looking for the password masking functionality.
For my color, this works like a charm after replacing in-game color codes {w, {y, etc with numerical designations:
Function AnsiColor(Color As Integer) As String
'Reference
'ANSI equivalent Description
'[ 3 0 m Set foreground to color #0 - black
'[ 3 1 m Set foreground to color #1 - red
'[ 3 2 m Set foreground to color #2 - green
'[ 3 3 m Set foreground to color #3 - yellow
'[ 3 4 m Set foreground to color #4 - blue
'[ 3 5 m Set foreground to color #5 - magenta
'[ 3 6 m Set foreground to color #6 - cyan
'[ 3 7 m Set foreground to color #7 - white
Select Case Color
Case Is <= 7
AnsiColor = Chr(27) & "[0m" & Chr(27) & "[3" & Color & "m"
Case Is >= 8
AnsiColor = Chr(27) & "[1m" & Chr(27) & "[3" & Color - 8 & "m"
End Select
End Function