好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁(yè) > 知識(shí)庫(kù) > script_tool_for_windows.bat Windows 環(huán)境下的 hosts 一鍵部署腳本

script_tool_for_windows.bat Windows 環(huán)境下的 hosts 一鍵部署腳本

熱門標(biāo)簽:清遠(yuǎn)百度地圖標(biāo)注店鋪位置 智能打電話機(jī)器人收費(fèi) 電話機(jī)器人全國(guó)招商 如何弄地圖標(biāo)注 呼倫貝爾外呼系統(tǒng) 電話機(jī)器人產(chǎn)品怎么樣 如何申請(qǐng)400電話業(yè)務(wù)mm 雷霆電銷機(jī)器人怎么樣 玉林市機(jī)器人外呼系統(tǒng)哪家好

我們提供了一系列工具讓您除了手動(dòng)以 復(fù)制/粘貼 的方式部署和更新 hosts 之外,有一種方便、一鍵式的方式來應(yīng)用我們的 hosts 。

我們現(xiàn)有的工具可以在下列平臺(tái)上工作:
Microsoft Windows (.bat script; Qt GUI tool; console (service type) tool)

另外,我們還推薦使用跨平臺(tái)的 Hozz 來管理、自動(dòng)更新 hosts 。

目前,我們共有:

Hozz: 跨平臺(tái)的 hosts 自動(dòng) 管理/更新 工具。是 @ppoffice 的項(xiàng)目。

項(xiàng)目主頁(yè)
項(xiàng)目Github主頁(yè) https://github.com/racaljk/hosts/tree/master/hosts_tools
HostTool: Windows 環(huán)境下的 hosts 自動(dòng)更新應(yīng)用,使用 C++ 構(gòu)建, GUI 基于 Qt 。由 @racaljk 貢獻(xiàn)。
HostToolforMac: Mac 環(huán)境下的 hosts 自動(dòng)部署更新應(yīng)用(適用于 OS X 10.10 或以上),基于 Swift 開發(fā)。由 @ZzzM 貢獻(xiàn)。
HostsToolforWindows: Windows console環(huán)境下的 hosts 自動(dòng)更新應(yīng)用(作為系統(tǒng)服務(wù)),使用 C++ 構(gòu)建。由 @Too-Naive 貢獻(xiàn)。
script_tool_for_windows.bat: Windows 環(huán)境下的 hosts 一鍵部署腳本,由 @redapple0204 與 @lizongzeshunshun 貢獻(xiàn)。以及 @lideming 提供的重要更新。

@echo off
if defined converted goto :converted

set ConverterPath=%temp%\HostsGeter_CodeConverter.vbs
set ConverterOutput=%temp%\HostsGeter_GBK.bat

echo inputpath="%~0" >%ConverterPath%
echo outputpath="%ConverterOutput%" >>%ConverterPath%
echo set stm2=createobject("ADODB.Stream") >>%ConverterPath%
echo stm2.Charset ="utf-8" >>%ConverterPath%
echo stm2.Open >>%ConverterPath%
echo stm2.LoadFromFile inputpath >>%ConverterPath%
echo readfile = stm2.ReadText >>%ConverterPath%
echo stm2.Close >>%ConverterPath%
echo Set Stm1 =CreateObject("ADODB.Stream") >>%ConverterPath%
echo Stm1.Type = 2 >>%ConverterPath%
echo Stm1.Open >>%ConverterPath%
echo Stm1.Charset ="GBK" >>%ConverterPath%
echo Stm1.Position = Stm1.Size >>%ConverterPath%
echo Stm1.WriteText "set converted=y" ^ vbcrlf >>%ConverterPath%
echo Stm1.WriteText readfile >>%ConverterPath%
echo Stm1.SaveToFile outputpath,2 >>%ConverterPath%
echo Stm1.Close >>%ConverterPath%
%ConverterPath%  %ConverterOutput%
goto :eof

:converted

chcp 936
:: 更改cmd窗口代碼頁(yè)至 936(GBK)

cls
%1 %2
ver|find " 5.">nul goto :st
echo 正在進(jìn)行 UAC 提權(quán)...
mshta vbscript:createobject("shell.application").shellexecute("%~s0","goto :st","","runas",1)(window.close)goto :eof
:st

cls

@REM HostsGet Version0.4
cd /d %~dp0

set LogFilePath=%temp%\HostsGeter_log.txt
set DLScriptPath=%temp%\downloadhosts.vbs
set DLPath=%windir%\system32\drivers\etc\hosts_downloaded
set BackupDir=%windir%\system32\drivers\etc
set HostsPath=%windir%\system32\drivers\etc\hosts

set LogToFile=^>^>%LogFilePath% 2^>^1
set EchoAndLog=call :echoandlog
echo. %LogToFile%
echo ==========[%date% %time%]========== %LogToFile%
echo 日志文件:
echo %LogFilePath%
echo.

echo iLocal=LCase("%DLPath%") > %DLScriptPath% ||(
 call :error downloadhosts.vbs 文件創(chuàng)建/寫入失敗.
)
echo iRemote=LCase("https://raw.githubusercontent.com/racaljk/hosts/master/hosts") >> %DLScriptPath%
echo Set xPost=createObject("Microsoft.XMLHTTP") 'Set Post = CreateObject("Msxml2.XMLHTTP") >> %DLScriptPath%
echo xPost.Open "GET",iRemote,0 >> %DLScriptPath%
echo xPost.Send() >> %DLScriptPath%
echo set sGet=createObject("ADODB.Stream") >> %DLScriptPath%
echo sGet.Mode=3 >> %DLScriptPath%
echo sGet.Type=1 >> %DLScriptPath%
echo sGet.Open() >> %DLScriptPath%
echo sGet.Write xPost.ResponseBody >> %DLScriptPath%
echo sGet.SaveToFile iLocal,2 >> %DLScriptPath%

%EchoAndLog% 開始從 GitHub 中下載 hosts 文件...
if exist %DLPath% del %DLPath% /s /q %LogToFile%
%DLScriptPath% || call :error hosts 文件下載失敗.
del %DLScriptPath% /s /q %LogToFile%
if not exist %DLPath% call :error hosts 文件下載失敗.
%EchoAndLog% 下載完成.
echo.

if exist %HostsPath% (
  call :backuphosts
) else (
  %EchoAndLog% (原 hosts 文件不存在,跳過備份)
)
%EchoAndLog% 正在替換 hosts 文件...
move %DLPath% %HostsPath% %LogToFile% || call :error hosts 文件替換失敗.
%EchoAndLog% hosts 文件已替換.
echo.

%EchoAndLog% 正在刷新系統(tǒng) DNS 緩存...
ipconfig /flushdns %LogToFile% || call :error DNS 緩存刷新失敗.
%EchoAndLog% DNS 緩存已刷新.
echo.
%EchoAndLog% 【操作全部完成!】
echo.

echo 按任意鍵訪問 google.com.hk 進(jìn)行測(cè)試,如取消,請(qǐng)直接關(guān)閉本窗口
pause >nul
start https://www.google.com.hk
echo 已經(jīng)幫你訪問 google.com.hk 如可以訪問則替換成功.
echo.
goto :end

:backuphosts
%EchoAndLog% 正在備份原 hosts 文件...
set "bakfilename=hosts_%date%_%time:~0,8%.bak"
set bakfilename=%bakfilename:/=-%
set bakfilename=%bakfilename:\=-%
set bakfilename=%bakfilename::=-%
set bakfilename=%bakfilename: =_%
copy %HostsPath% %BackupDir%\%bakfilename% %LogToFile% || call :error hosts 文件備份失敗.
%EchoAndLog% 原 hosts 文件已備份到 %BackupDir%\%bakfilename%.
echo.
goto :eof

:error
echo ======================
%EchoAndLog% 錯(cuò)誤:%*
start %LogFilePath%
echo 已打開日志文件
goto :end

:echoandlog
echo %*
echo %* %LogToFile%
goto :eof

:end
echo 按任意鍵關(guān)閉
pause >nul
exit

您可能感興趣的文章:
  • script_tool_for_linux.bash: Linux 環(huán)境下的 hosts 一鍵部署腳本

標(biāo)簽:樂山 臺(tái)州 江西 株洲 白銀 蕪湖 公主嶺 三門峽

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《script_tool_for_windows.bat Windows 環(huán)境下的 hosts 一鍵部署腳本》,本文關(guān)鍵詞  script,tool,for,windows.bat,Windows,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《script_tool_for_windows.bat Windows 環(huán)境下的 hosts 一鍵部署腳本》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于script_tool_for_windows.bat Windows 環(huán)境下的 hosts 一鍵部署腳本的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 操失禁| 清冷受h被做晕h强制| 操贵妇| 欧美网站免费观看在线| 澳门一肖一码一一特一中| 劳拉的欲望电影| 肉嫁高柳家在线播放| 37西方大但人文艺术| 最新毛片网站| 屁屁影院地址永久入口2022| yyyyyy111111少妇影院| 国产免费无遮挡精品视频| japanese色系freevi日本| 国产黄色影片| 丰满人妻熟女aⅴ中文字幕 | 禁漫网页版| 男女做污事无遮挡免费观看| 真人一级一级97片在线观看| 秋霞黄色片| 欧美在线综合| jizzjizz日本护士久久高清| 日本啪啪小视频| 法国《熟妇的荡欲》| 国产一级A片久久久免费妓女| 免费国产a| 亚洲欧洲日韩综合色天使不卡| 国产精品久久久久精品综合紧| 精品国产污网在线看入口网爆门| 国产边添边摸边做边爱| 亚洲依依成人综合在线网址| 啊灬啊别停灬啊灬快点bd高清 | 做了都要爱韩国电影| 日本娇妻在丈面前被耍了装修工| 日本???96免费观看| 哚哚影院先锋影视| 很黄| 国内精品久久久久久久日韩| 换爱交换乱理伦片西瓜影院| 日本黄色一区| 欧美做受???高溯视频| 大??美女100%棵视频|