亚洲乱码一卡二卡四卡乱码新区_亚洲乱码中文字幕小综合_亚洲人成电影在线播放_亚洲性色AV一区二区三区_亚洲一区二区三区影院_亚洲中文字幕久久精品无码A_亚洲中文字幕无码专区_伊人热热久久原色播放WWW_在线观看AV永久免费_最新欧洲大片免费在线,欧美日韩成人三级免费看,久久黄色网址,欧美激情内射喷水高潮

第七課:sql server 常用操作遠(yuǎn)程桌面語句
專注APT攻擊與防御
https://micropoor.blogspot.com/
1.是否開啟遠(yuǎn)程桌面,1表示關(guān)閉,0表示開啟
EXEC master..xp_regread 'HKEY_LOCAL_MACHINE','SYSTEMCurrentControlSetControlTerminal Server'
,'fDenyTSConnections'

2.讀取遠(yuǎn)程桌面端口
EXEC master..xp_regread 'HKEY_LOCAL_MACHINE','SYSTEMCurrentControlSetControlTerminal
ServerWinStationsRDP-Tcp','PortNumber'

3.開啟遠(yuǎn)程桌面
EXEC master.dbo.xp_regwrite'HKEY_LOCAL_MACHINE','SYSTEMCurrentControlSetControlTerminal
Server','fDenyTSConnections','REG_DWORD',0;
reg文件開啟遠(yuǎn)程桌面:
Windows Registry Editor Version 5.00HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal
Server]"fDenyTSConnections"=dword:00000000[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlTerminal
ServerWinStationsRDP-Tcp]"PortNumber"=dword:00000d3d
////
保存micropoor.reg,并執(zhí)行regedit /s micropoor.reg
注:如果第一次開啟遠(yuǎn)程桌面,部分需要配置防火墻規(guī)則允許遠(yuǎn)程端口。
netsh advfirewall firewall add rule name="Remote Desktop" protocol=TCP dir=in localport=3389 action=allow

4.關(guān)閉遠(yuǎn)程桌面
EXEC master.dbo.xp_regwrite'HKEY_LOCAL_MACHINE','SYSTEMCurrentControlSetControlTerminal
Server','fDenyTSConnections','REG_DWORD',1;

Micropoor
?