Page 1 of 1

debugging script utilizing ANSI formatted screens

Posted: 01 Oct 2022 03:51
by lazna
Echoing text to screen is not suitable in such case, so I think about it and develop solution to send debug messages to different CMD window. It utilize ncat.exe from nmap program package and fprint.exe from this forum.


I am create :nc function in my script

Code: Select all

REM == Set-up netcat debug logging - EXPERIMENTAL ==
start "" /B cmd /C"printf "%~1%~2"|ncat localhost 12345"
starting ncat server (in separate window) on scripts header by following command

Code: Select all

ncat.exe -k -l localhost 12345
than using :nc function by following way:

Code: Select all

call :nc <echoed_text> [\n]
Any comment or improovements are welcome..