zoukankan      html  css  js  c++  java
  • 修改3389为53389

    cls
     @color 0A
     @mode con cols=80 lines=32
     @title ★修改默认3389端口★
     @echo off
     echo =====================================================
     echo ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
     echo ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
     echo ※                               修改3389.bat v1.0                            ※
     echo ※                                 create by jim                              ※
     echo ※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
     echo ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
     echo 时间:%date%   %time%
     echo =======================================================
     echo 用途:通过修改注册表,修改默认3389端口
    echo =======================================================
     goto :3389-1
     :3389-1
     ::***********************************************************
     ::导出3389端口默认注册表
    reg export "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Server"  c:3389.reg
     goto :3389-2
     :3389-2
     set port1=53389
    reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal ServerWinStationsRDP-Tcp" /t REG_DWORD /v portnumber /d %port1% /f
     set port2=53389
    reg add "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal Serverwds dpwd ds cp" /t REG_DWORD /v portnumber /d %port1% /f
     if %port1%==%port2% (echo 修改成功!!!) else (echo 两次输入不一致,请重新输入。&goto 3389-2)
     goto :QUIT
     :QUIT
    netsh firewall set portopening tcp 53389 mstsc-53389 enable
    net stop TermService
    net start TermService
     echo ________________________________________________________
     echo.
     echo ________________________________________________________
     echo            [Press any key to quit]
     echo ________________________________________________________
     echo.
     pause >nul
     exit

  • 相关阅读:
    windbg学习.expr和masm表达式
    ThisCall调用分析
    windbg学习 gc j(Execute IfElse).if
    windbg学习¥{} Alias Interpreter 别名解释器
    windbg学习!vadump和.hh和!vprotc
    windbg学习 .lines
    windbg学习条件断点
    $<, $><, $$<, $$><, $$>a< (Run Script File)
    windbg学习?? 和 ?
    vimbook–OPL –official publications library
  • 原文地址:https://www.cnblogs.com/EasonJim/p/5482835.html
Copyright © 2011-2022 走看看