Skip to content

Commit

Permalink
fixed use \
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Jun 25, 2014
1 parent e8c3965 commit 1641683
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ IP不总是可用的, 因素可能是GFW封锁或Google IP变动. <br/>
另外Google的好多服务都已经不挂在北京的IP上了<br/>
**你可以用此脚本去寻找最适合你的稳定IP.**

### 脚本依赖

* grep v2.20
* sed v4.2.2
* awk v4.1.1
* nmap v6.46
* dig v9.9.2-P2

### 脚本如何使用

`find.sh`查询某段IP详细信息,可接受一个或多个参数(这个可检测IP是否被封锁, 443端口是否被封锁)
Expand Down Expand Up @@ -97,17 +89,19 @@ $ ./auto.sh 192.168 192.169.1
$ nslookup -q=TXT _netblocks.google.com 8.8.4.4
```

> \>\> [hosts][hosts] \<\< `UPDATE: Tue Jun 24 10:14:07 UTC 2014` <br/>
> 下面的两个程序是用来将项目内hosts文件更新你系统hosts. 尤其对不懂程序的Windows朋友很方便<br/>
> **注意**: 如果此hosts文件内的IP失效, 就需要你自己用脚本查询了<br/>
### 最新hosts

\>\> [hosts][hosts] \<\< `UPDATE: Tue Jun 24 10:14:07 UTC 2014` <br/>
**注意**: 如果此hosts文件内的IP失效, 就需要你自己用脚本查询了<br/>
下面的两个程序是用来将项目内hosts文件更新你系统hosts. 尤其对不懂程序的Windows朋友很方便<br/>

### Windows 用户
#### Windows 用户

* 下载[fuckGFW-64.exe][fuckGFW-64.exe](64位)或[fuckGFW-32.exe][fuckGFW-32.exe](32位)
* 双击运行一下即可. 更新也是双击运行一下
* 此程序不会覆盖你原有的 hosts

### *nix/OSX 用户
#### \*nix/OSX 用户

* 下载此脚本 [updateHosts.py][updateHosts.py]
* 执行 `$ sudo python /PATH/TO/updateHosts.py`, 更新也一样
Expand Down
9 changes: 9 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### 脚本依赖

* grep v2.20
* sed v4.2.2
* awk v4.1.1
* nmap v6.46
* dig v9.9.2-P2
* curl 7.37.0

6 changes: 4 additions & 2 deletions scripts/use.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ fi

if [ "$(echo $1 | cut -d . -f 1)" = "*" ]
then
sed -i -r "s/.*? (.${1//\./\\\.})$/$2 \1/" hosts.all
p=${1//\./\\\.}
sed -i -r "s/.*? (.$p)$/$2 \1/" hosts.all
else
sed -i -r "s/.*? (${1//\./\\\.})$/$2 \1/" hosts.all
p=${1//\./\\\.}
sed -i -r "s/.*? ($p)$/$2 \1/" hosts.all
fi

0 comments on commit 1641683

Please sign in to comment.