{"action":"created","issue":{"url":"https://api.github.com/repos/racaljk/hosts/issues/215","repository_url":"https://api.github.com/repos/racaljk/hosts","labels_url":"https://api.github.com/repos/racaljk/hosts/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/racaljk/hosts/issues/215/comments","events_url":"https://api.github.com/repos/racaljk/hosts/issues/215/events","html_url":"https://github.com/racaljk/hosts/issues/215","id":133397423,"number":215,"title":"是否可以将这个自动获取hosts的bat放到Host Tools 里？","user":{"login":"redapple0204","id":16254644,"avatar_url":"https://avatars.githubusercontent.com/u/16254644?v=3","gravatar_id":"","url":"https://api.github.com/users/redapple0204","html_url":"https://github.com/redapple0204","followers_url":"https://api.github.com/users/redapple0204/followers","following_url":"https://api.github.com/users/redapple0204/following{/other_user}","gists_url":"https://api.github.com/users/redapple0204/gists{/gist_id}","starred_url":"https://api.github.com/users/redapple0204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redapple0204/subscriptions","organizations_url":"https://api.github.com/users/redapple0204/orgs","repos_url":"https://api.github.com/users/redapple0204/repos","events_url":"https://api.github.com/users/redapple0204/events{/privacy}","received_events_url":"https://api.github.com/users/redapple0204/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/racaljk/hosts/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":35,"created_at":"2016-02-13T04:35:10Z","updated_at":"2016-02-14T09:45:53Z","closed_at":null,"body":"%1 %2 \r\nver|find \"5.\">nul&&goto :st \r\nmshta vbscript:createobject(\"shell.application\").shellexecute(\"%~s0\",\"goto :st\",\"\",\"runas\",1)(window.close)&goto :eof \r\n:st \r\n\r\ncopy \"%~0\" \"%windir%\\system32\\\" \r\ncls\r\n@REM HostsGet Version0.2\r\n\r\n@echo off\r\ndel %temp%\\download.vbs > nul\r\ncd /d %~dp0\r\necho 初始化中...\r\n\r\necho iLocal=LCase(\"c:\\hosts\") >> %temp%\\download.vbs\r\necho iRemote=LCase(\"https://raw.githubusercontent.com/racaljk/hosts/master/hosts\") >> %temp%\\download.vbs\r\n\r\necho Set xPost=createObject(\"Microsoft.XMLHTTP\") 'Set Post = CreateObject(\"Msxml2.XMLHTTP\") >> %temp%\\download.vbs\r\necho xPost.Open \"GET\",iRemote,0 >> %temp%\\download.vbs\r\necho xPost.Send() >> %temp%\\download.vbs\r\necho set sGet=createObject(\"ADODB.Stream\") >> %temp%\\download.vbs\r\necho sGet.Mode=3 >> %temp%\\download.vbs\r\necho sGet.Type=1 >> %temp%\\download.vbs\r\necho sGet.Open() >> %temp%\\download.vbs\r\necho sGet.Write xPost.ResponseBody >> %temp%\\download.vbs\r\necho sGet.SaveToFile iLocal,2 >> %temp%\\download.vbs\r\n\r\necho 初始化完成...请稍后...\r\nping 127.0.0.1 > nul\r\necho 开始从github中下载hosts\r\n%temp%\\download.vbs\r\necho 请稍后...\r\ndel %temp%\\download.vbs /s /q\r\nping 127.0.0.1 > nul\r\necho 正在备份原hosts...\r\nmove %windir%\\system32\\drivers\\etc\\hosts %windir%\\\r\nset filename=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%\r\nren %windir%\\hosts %filename%.bak\r\necho %filename%.bak >> hostbak.txt\r\n\r\necho hosts文件已经备份到%windir%，名字为当前的时间，例如20160212182118.bak ，备份的文件名称保存在hostsbak.txt.\r\n\r\nmove c:\\hosts %windir%\\system32\\drivers\\etc\\\r\necho hosts替换完成.\r\nipconfig /flushdns\r\necho 按任意键访问google.com.hk进行测试，如取消，请直接关闭本窗口\r\npause >nul\r\nstart https://www.google.com.hk\r\necho 已经帮你访问google.com.hk 如可以访问则替换成功.\r\n\r\necho 按任意键关闭\r\npause >nul\r\n"},"comment":{"url":"https://api.github.com/repos/racaljk/hosts/issues/comments/183863059","html_url":"https://github.com/racaljk/hosts/issues/215#issuecomment-183863059","issue_url":"https://api.github.com/repos/racaljk/hosts/issues/215","id":183863059,"user":{"login":"redapple0204","id":16254644,"avatar_url":"https://avatars.githubusercontent.com/u/16254644?v=3","gravatar_id":"","url":"https://api.github.com/users/redapple0204","html_url":"https://github.com/redapple0204","followers_url":"https://api.github.com/users/redapple0204/followers","following_url":"https://api.github.com/users/redapple0204/following{/other_user}","gists_url":"https://api.github.com/users/redapple0204/gists{/gist_id}","starred_url":"https://api.github.com/users/redapple0204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redapple0204/subscriptions","organizations_url":"https://api.github.com/users/redapple0204/orgs","repos_url":"https://api.github.com/users/redapple0204/repos","events_url":"https://api.github.com/users/redapple0204/events{/privacy}","received_events_url":"https://api.github.com/users/redapple0204/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T09:45:53Z","updated_at":"2016-02-14T09:45:53Z","body":"@lizongzeshunshun\r\n好的"}}