{"id":9753,"date":"2019-04-12T03:24:46","date_gmt":"2019-04-11T19:24:46","guid":{"rendered":"http:\/\/4563.org\/?p=9753"},"modified":"2019-07-23T02:57:27","modified_gmt":"2019-07-22T18:57:27","slug":"bat%e8%84%9a%e6%9c%ac-%e4%b8%80%e9%94%ae%e4%bf%ae%e6%94%b9windows%e8%bf%9c%e7%a8%8b%e6%a1%8c%e9%9d%a23389%e7%ab%af%e5%8f%a3%e4%b8%8e%e7%94%a8%e6%88%b7%e5%af%86%e7%a0%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=9753","title":{"rendered":"bat\u811a\u672c : \u4e00\u952e\u4fee\u6539Windows\u8fdc\u7a0b\u684c\u97623389\u7aef\u53e3\u4e0e\u7528\u6237\u5bc6\u7801"},"content":{"rendered":"<p>\u4e0d\u7528\u8f6f\u4ef6\u9ebb\u70e6\uff0cbat\u6279\u5904\u7406\u811a\u672c\u5c31\u80fd\u5b8c\u6210\u8fd9\u4e24\u9879\u4efb\u52a1\uff0c\u7531\u4e8e\u5404\u4f4dDD\u5b8cWindows\u7cfb\u7edf\u540e\uff0c<br \/>\n\u4fee\u6539\u8fdc\u7a0b\u7aef\u53e3\u6bd4\u8f83\u9ebb\u70e6\uff0c\u7279\u6b64\u63a8\u51fa\u4e00\u952e\u811a\u672c\uff0c\u65b9\u4fbf\u5404\u4f4d\u575b\u53cb\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-9754\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2019\/04\/20190411_192335.png\" alt=\"\" width=\"404\" height=\"241\" \/><\/p>\n<blockquote>\n<div id=\"code_Abz\">\n<ol>\n<li>@echo off<\/li>\n<li>&gt;nul 2&gt;&amp;1 &#8220;%SYSTEMROOT%\\system32\\cacls.exe&#8221; &#8220;%SYSTEMROOT%\\system32\\config\\system&#8221;<\/li>\n<li>if &#8216;%errorlevel%&#8217; NEQ &#8216;0&#8217; (<\/li>\n<li>goto UACPrompt<\/li>\n<li>) else ( goto gotAdmin )<\/li>\n<li>:UACPrompt<\/li>\n<li>echo Set UAC = CreateObject^(&#8220;Shell.Application&#8221;^) &gt; &#8220;%temp%\\getadmin.vbs&#8221;<\/li>\n<li>echo UAC.ShellExecute &#8220;%~s0&#8221;, &#8220;&#8221;, &#8220;&#8221;, &#8220;runas&#8221;, 1 &gt;&gt; &#8220;%temp%\\getadmin.vbs&#8221;<\/li>\n<li>&#8220;%temp%\\getadmin.vbs&#8221;<\/li>\n<li>exit \/B<\/li>\n<li>:gotAdmin<\/li>\n<li>if exist &#8220;%temp%\\getadmin.vbs&#8221; ( del &#8220;%temp%\\getadmin.vbs&#8221; )<\/li>\n<li>title \u4fee\u6539\u8fdc\u7a0b\u7aef\u53e3\u4e0e\u7528\u6237\u5bc6\u7801\u00a0\u00a0www.nat.ee<\/li>\n<li>mode con: cols=55 lines=10<\/li>\n<li>color 17<\/li>\n<li>set &#8220;ing=ping -n 5 127.0.0.1 &gt; nul&#8221;<\/li>\n<li>:Menu<\/li>\n<li>cls<\/li>\n<li>echo ==============================<\/li>\n<li>echo.<\/li>\n<li>echo 1.\u4fee\u6539\u8fdc\u7a0b\u7aef\u53e3<\/li>\n<li>echo.<\/li>\n<li>echo 2.\u4fee\u6539\u7528\u6237\u5bc6\u7801<\/li>\n<li>echo.<\/li>\n<li>echo 3.\u91cd\u542f\u8ba1\u7b97\u673a<\/li>\n<li>echo.<\/li>\n<li>echo ==============================<\/li>\n<li>set \/p user_input=\u8bf7\u8f93\u5165\u6570\u5b57\uff1a<\/li>\n<li>if %user_input% equ 1 goto:RemotePort<\/li>\n<li>if %user_input% equ 2 goto:Password<\/li>\n<li>if %user_input% equ 3 goto:Restart<\/li>\n<li>:RemotePort<\/li>\n<li>cls<\/li>\n<li>set \/P &#8220;Port=\u81ea\u5b9a\u4e49\u8fdc\u7a0b\u684c\u9762\u7aef\u53e3(1-65535): &#8220;<\/li>\n<li>if %Port% leq 65535 (<\/li>\n<li>Reg add &#8220;HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\Wds\\rdpwd\\Tds\\tcp&#8221; \/v &#8220;PortNumber&#8221; \/t REG_DWORD \/d &#8220;%Port%&#8221; \/f\u00a0\u00a0&gt; nul<\/li>\n<li>Reg add &#8220;HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\WinStations\\RDP-Tcp&#8221; \/v &#8220;PortNumber&#8221; \/t REG_DWORD \/d &#8220;%Port%&#8221; \/f\u00a0\u00a0&gt; nul<\/li>\n<li>Reg add &#8220;HKLM\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\FirewallRules&#8221; \/v &#8220;{338933891-3389-3389-3389-338933893389}&#8221; \/t REG_SZ \/d &#8220;v2.29|Action=Allow|Active=TRUE|Dir=In|Protocol=6|LPort=%Port%|Name=Remote Desktop(TCP-In)|&#8221; \/f &gt; nul<\/li>\n<li>Reg add &#8220;HKLM\\SYSTEM\\CurrentControlSet\\Services\\SharedAccess\\Parameters\\FirewallPolicy\\FirewallRules&#8221; \/v &#8220;{338933892-3389-3389-3389-338933893389}&#8221; \/t REG_SZ \/d &#8220;v2.29|Action=Allow|Active=TRUE|Dir=In|Protocol=17|LPort=%Port%|Name=Remote Desktop(UDP-In)|&#8221; \/f &gt; nul<\/li>\n<li>echo \u4fee\u6539\u6210\u529f<\/li>\n<li>echo \u8bf7\u7262\u8bb0\uff0c\u4f60\u7684\u8fdc\u7a0b\u7aef\u53e3\u662f: %Port%<\/li>\n<li>echo \u91cd\u542f\u8ba1\u7b97\u673a\u751f\u6548<\/li>\n<li>%ing% &amp;&amp; goto :Menu) else (echo \u9519\u8bef\u7684\u7aef\u53e3\uff0c%Port% \u5927\u4e8e\u6240\u8bbe\u7f6e\u7684\u8303\u56f4\uff0c\u8bf7\u5728&#8221;1-65535&#8243;\u5185\u3002<\/li>\n<li>%ing% &amp;&amp; goto:RemotePort)<\/li>\n<li>:Password<\/li>\n<li>cls<\/li>\n<li>echo \u5f53\u524d\u4fee\u6539Administrator\u7528\u6237\u5bc6\u7801<\/li>\n<li>set \/p pwd1=\u8bf7\u8f93\u5165\u5bc6\u7801\uff1a<\/li>\n<li>cls<\/li>\n<li>set \/p pwd2=\u8bf7\u518d\u6b21\u8f93\u5165\u5bc6\u7801\uff1a<\/li>\n<li>if &#8220;%pwd1%&#8221;==&#8221;%pwd2%&#8221; (<\/li>\n<li>net user Administrator %pwd2%<\/li>\n<li>echo \u4fee\u6539\u6210\u529f\uff0c\u8bf7\u7262\u8bb0\u4f60\u7684\u5bc6\u7801\u3002<\/li>\n<li>%ing% &amp;&amp; goto :Menu)else (echo \u5bc6\u7801\u9519\u8bef\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002<\/li>\n<li>%ing% &amp;&amp; goto:Password)<\/li>\n<li>:Restart<\/li>\n<li>shutdown.exe \/r \/f \/t 0<\/li>\n<\/ol>\n<\/div>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u53e6\u5b58\u4e3a 3389.bat \u811a\u672c\u5373\u53ef\u3002<\/p>\n<p>4563\u672c\u5730\u4e0b\u8f09<\/p>\n<p><a href=\"http:\/\/4563.org\/wp-content\/uploads\/2019\/04\/20190411_192359.zip\">20190411_192359<\/a><\/p>\n<p>\u4f86\u6e90:https:\/\/www.hostloc.com\/thread-538482-1-1.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u7528\u8f6f\u4ef6\u9ebb\u70e6\uff0cbat\u6279\u5904\u7406\u811a\u672c\u5c31\u80fd&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/9753"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9753"}],"version-history":[{"count":1,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/9753\/revisions"}],"predecessor-version":[{"id":9756,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/9753\/revisions\/9756"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9753"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}