From d7ff9a5bec516ca8454f5e83dbce204b1053ac20 Mon Sep 17 00:00:00 2001 From: Unostvisal Date: Thu, 27 Oct 2016 21:06:28 +0800 Subject: [PATCH 1/6] delete google img --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 04bcd66..c227641 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ --- -![Google](https://camo.githubusercontent.com/6f787bdcb60b630c8cb9dd463ffe73b3bcacba70/68747470733a2f2f7777772e676f6f676c652e636f6d2f6c6f676f732f646f6f646c65732f323031362f676f6f676c65732d313874682d62697274686461792d353636313533353637393534353334342d687032782e676966) - - 先说说这个小工具的原理吧,就是替换hosts文件。然后其依赖于GitHub上一个维护小组(https://github.com/racaljk/hosts)的hosts更新文件。 然后这个工具在每次运行的时候,都会自动的下载最新的hosts文件,并在备份当前的hosts文件为hosts_bak后自动的完成替换工作。 From f4dcef7000d24e250ccab111efb08b80a655dbba Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 28 Oct 2016 09:07:20 +0800 Subject: [PATCH 2/6] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决 超链接后缀异常导致的404错误 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c227641..85d35bb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ --- -先说说这个小工具的原理吧,就是替换hosts文件。然后其依赖于GitHub上一个维护小组(https://github.com/racaljk/hosts)的hosts更新文件。 +先说说这个小工具的原理吧,就是替换hosts文件。然后其依赖于GitHub上一个维护小组( https://github.com/racaljk/hosts )的hosts更新文件。 然后这个工具在每次运行的时候,都会自动的下载最新的hosts文件,并在备份当前的hosts文件为hosts_bak后自动的完成替换工作。 From d8a54a73b71729087e49acff9b082cdba957236d Mon Sep 17 00:00:00 2001 From: Victor Date: Fri, 28 Oct 2016 09:09:48 +0800 Subject: [PATCH 3/6] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 博客链接404的原因是CSDN官方 对本人的博客进行了删除(原因就在于翻墙)。 以截图的方式重写了一篇,更新后可读。 --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 85d35bb..2201b4e 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,7 @@ 点击下载---->>>>>>> -更多细节,可以参考下面的文章链接 http://blog.csdn.net/marksinoberg/article/details/52934770 - +更多细节,可以参考下面的文章链接 http://blog.csdn.net/marksinoberg/article/details/52943194 --- 先说说这个小工具的原理吧,就是替换hosts文件。然后其依赖于GitHub上一个维护小组( https://github.com/racaljk/hosts )的hosts更新文件。 From fa2386b126e3f374069fd8fc216b1ae3ca4c9f11 Mon Sep 17 00:00:00 2001 From: kba977 Date: Sat, 5 Nov 2016 10:57:26 +0800 Subject: [PATCH 4/6] Update crowall.py Add support for Mac. --- crowall.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crowall.py b/crowall.py index 2354a1c..a082a3b 100644 --- a/crowall.py +++ b/crowall.py @@ -33,6 +33,11 @@ def crosswall(systemtype='Window'): os.system('pause') os.system('sudo /etc/init.d/networking restart ') print 'It\'s done on Linux! And Try your browser!' + elif systemtype == "Darwin": + os.system('sudo cp /etc/hosts /etc/host_bak') + os.system('sudo mv ./hosts /etc/hosts') + os.system('sudo ifconfig en0 down && sudo ifconfig en0 up') + print 'It\'s done on Mac! And Try your browser!' except Exception as e: print e From 1ce127f74ef19e6f67b4e3f69ba43d1a2b090c8e Mon Sep 17 00:00:00 2001 From: kba977 Date: Sat, 5 Nov 2016 14:20:33 +0800 Subject: [PATCH 5/6] Update crowall.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modify a small error. It works on my mac. ![1]( 7xrahm.com1.z0.glb.clouddn.com/屏幕快照_2016-11-05_14.13.18.png) --- crowall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crowall.py b/crowall.py index a082a3b..509225d 100644 --- a/crowall.py +++ b/crowall.py @@ -28,14 +28,14 @@ def crosswall(systemtype='Window'): os.system('pause') print 'It\'s done on Windows! And Try your browser!' elif systemtype == "Linux": - os.system('cp /etc/hosts /etc/hosts_bak') + os.system('cp /etc/hosts.txt /etc/hosts_bak') os.system('mv ./hosts /etc/hosts') os.system('pause') os.system('sudo /etc/init.d/networking restart ') print 'It\'s done on Linux! And Try your browser!' elif systemtype == "Darwin": os.system('sudo cp /etc/hosts /etc/host_bak') - os.system('sudo mv ./hosts /etc/hosts') + os.system('sudo mv ./hosts.txt /etc/hosts') os.system('sudo ifconfig en0 down && sudo ifconfig en0 up') print 'It\'s done on Mac! And Try your browser!' except Exception as e: From e3f79c1b4b4d900926d4075ca4ab9d3dac4fd004 Mon Sep 17 00:00:00 2001 From: AlexDialga <14726859+AlexDialga@users.noreply.github.com> Date: Wed, 30 Aug 2017 19:51:06 +0800 Subject: [PATCH 6/6] Update crowall.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 旧日支配者已征途远方。 --- crowall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowall.py b/crowall.py index 509225d..93505f7 100644 --- a/crowall.py +++ b/crowall.py @@ -45,7 +45,7 @@ def crosswall(systemtype='Window'): if __name__ == '__main__': - url = 'https://raw.githubusercontent.com/racaljk/hosts/master/hosts' + url = 'https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts' downloadHosts(url=url) print 'Hosts update success!' crosswall(platform.system())