Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement the script for monitoring 3389 login

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to implement a script to monitor 3389 logins. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

When a remote host logs in to the server through 3389, how do you find and record it? The following script can help us.

Script: date / t > > RDPlog.txt

Time / t > > RDPlog.txt

Netstat-n-p tcp | find ": 3389" > > RDPlog.txt

Save the above three sentences as a bat file and set them to run as soon as you log in in the planned task.

The first line of code is used to record the date the user logged in. "date / t" means to return the system date and use the append symbol "> >" to record this time in "RDPlog.txt" as the date field of the log. The second line of code is used to record the time the user logged in. "time / t" means to return the system time, using the appending symbol "> >" to record this time in "RDPlog.txt" as the log time field. The third line of code records the IP address of the end user. "netstat" is a command used to display the current network connection status, "- n" is used to display IP and port, "- p tcp" shows TCP protocol, pipe symbol "|" will output the result of the "netstat" command to the "find" command, and then look for the information containing "3389" from the output result and record it in the RDPlog.txt file.

Thank you for reading! This is the end of this article on "how to monitor 3389 login scripts". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report