Does anyone knows how to change batch file/cmd background color using netstat command?
I'm actually monitoring some bank acquirers connections to a server with an auto-refreshing 'netstat' command.
title BANK #1
netstat -n 1 -an | find "IP_ADDRESS:PORT"
pause
And cmd echoes:
If connection is estabilished:
TCP MY_SERVER_IP_ADD:LIST_PORT REMOTE_IP_ADD:PORT ESTABLISHED
If connection failed:
TCP MY_SERVER_IP_ADD:LIST_PORT REMOTE_IP_ADD:PORT SYN_SENT
I need to know if is posible that background color changes depending on status, i mean, when status is ESTABLISHED
, turn background Green. When status is SYN_SENT
, turn background RED.