Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement