mikedopp icon

TCP_Activity_LOG

mikedopp | PRO | 09/02/15 03:38:50 PM UTC | 0 ⭐ | 332 👁️ | Never ⏰ | []
Batch |

960 B

|

None

|

0 👍

/

0 👎

:: COMMENT:  This script shows all connections, listening ports, applications
::           making a connection and display full DNS name for each connection
::           for easier understanding of where the connections are being made.
::           -n option to only display the IP address. The 4 option will poll
::           every 4 seconds for connections to make it east to track what is going on.
::           The results are piped to a txt file. Create a txt file with a list of servers/workstations.
::           Modified 6-17-2015
:::::::
@echo off
cls
echo ** This gathers TCP activity on this server **
echo.
:: Prompt for Server Name
SET /P ServerName=" Enter Server Name : "
echo.
echo ** Data is being gathered, please wait **
echo.
echo ** To stop data collection, use CTRL+C **
netstat -abfn 4 >> %ServerName%-TCPActivity.txt
echo.
echo ** Processing is done, %ServerName%-TCPActivity.txt file will now open **
notepad.exe %ServerName%-TCPActivity.txt

Comments