Record batch processing for 3389 Remote Desktop IP per entry bat_dos/bat

Source: Internet
Author: User
Tags echo date
The following code is copied to save into a batch file and then double-click!
Copy Code code as follows:

MD C:\WINDOWS\PDPLOG
echo date/t ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
echo time/t ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
echo Netstat-n-P TCP ^| Find ": 3389" ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
echo Start Explorer >>c:\windows\pdplog\pdplog.cmd

:: Add users each time to enter the Remote Desktop automatically record the use of IP, can be used to find the hacker traces!
REG ADD "hkey_local_machine\system\controlset001\control\terminal server\winstations\rdp-tcp"/V finheritinitialprogram/t reg_dword/d "00000000"/F
Reg ADD "hkey_local_machine\system\controlset001\control\terminal server\winstations\rdp-tcp"/V workdirectory/t REG _SZ/D C:\WINDOWS\PDPLOG\/F
REG ADD "hkey_local_machine\system\controlset001\control\terminal server\winstations\rdp-tcp"/V initialprogram/t REG_SZ/D "C:\WINDOWS\PDPLOG\PdPLOG.CMD"/F
REG ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal server\winstations\rdp-tcp"/V finheritinitialprogram/t reg_dword/d "00000000"/F
REG ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal server\winstations\rdp-tcp"/V WorkDirectory/ T reg_sz/d C:\WINDOWS\PDPLOG\/F
REG ADD "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal server\winstations\rdp-tcp"/V InitialProgram /t reg_sz/d "C:\WINDOWS\PDPLOG\PdPLOG.CMD"/F

Echo Log Remote Desktop IP policy complete! Please press any key to exit!
PAUSE >nul


echo Netstat-n-P TCP ^| Find ": 3389" ^>^>rdplog.txt >>c:\windows\pdplog\pdplog.cmd
There is a 3389 digit in the above sentence, which is the default port for Remote Desktop.
If you change a friend of Remote Desktop, you need to replace 3389 with the port you changed.

View the record place in C:\WINDOWS\PDPLOG\RDPlog.txt

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.