1 Star 0 Fork 0

ZiyangLi / googlehosts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
simpleuhosts.vbs 743 Bytes
一键复制 编辑 原始数据 按行查看 历史
jiange1236 提交于 2014-11-17 23:51 . simpleuhosts.vbs
Sub download(url,target)
Const adTypeBinary = 1
Const adTypeText = 2
Const adSaveCreateOverWrite = 2
Dim http,ado
Set http = CreateObject("Msxml2.ServerXMLHTTP")
http.SetOption 2,13056
http.open "GET",url,False
http.send
Set ado = createobject("Adodb.Stream")
ado.Type = adTypeBinary
ado.Open
ado.Write http.responseBody
ado.SaveToFile target,adSaveCreateOverWrite
ado.Close
End Sub
Set WshShell=CreateObject("WScript.Shell")
WinDir =WshShell.ExpandEnvironmentStrings("%WinDir%")
HostsFile = WinDir & "\System32\Drivers\etc\Hosts"
Const hosts="https://raw.githubusercontent.com/vokins/simpleu/master/hosts"
download hosts,HostsFile
1
https://gitee.com/ziyangli/googlehosts.git
git@gitee.com:ziyangli/googlehosts.git
ziyangli
googlehosts
googlehosts
master

搜索帮助