debugging script utilizing ANSI formatted screens
Posted: 01 Oct 2022 03:51
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.
https://nmap.org/ncat/
viewtopic.php?t=7312
I am create :nc function in my script
starting ncat server (in separate window) on scripts header by following command
than using :nc function by following way:
Any comment or improovements are welcome..
https://nmap.org/ncat/
viewtopic.php?t=7312
I am create :nc function in my script
Code: Select all
:nc
REM == Set-up netcat debug logging - EXPERIMENTAL ==
start "" /B cmd /C"printf "%~1%~2"|ncat localhost 12345"
GOTO:EOF
Code: Select all
ncat.exe -k -l localhost 12345
Code: Select all
call :nc <echoed_text> [\n]