Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Commit 4abaaff

Browse files
author
Too-Naive
committed
Bug fixed
* Change copyright year
1 parent a8e50c8 commit 4abaaff

File tree

7 files changed

+32
-30
lines changed

7 files changed

+32
-30
lines changed

README.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
# Download Executable File
44

55
[![Build status](https://ci.appveyor.com/api/projects/status/8aya86796ipmuwr2/branch/master?svg=true)](https://ci.appveyor.com/project/Too-Naive/windows/branch/master)
6-
Last update: Sept. 7th, 2017
6+
Last update: Jan. 17th, 2018
77

8-
#### 下载地址:(v2.2.0)
8+
#### 下载地址:(v2.2.1)
99

1010
- zip Package (Include `tool.exe` and `choose.exe`)
11-
- [点我来下载](https://git.io/v5wzs)
11+
- [点我来下载](https://git.io/vN8tJ)
1212

13-
如只需下载tool.exe请到[release](https://github.com/HostsTools/Windows/releases)页面手动下载
13+
如只需下载tool.exe请到[release](https://github.com/HostsTools/Windows/releases/latest)页面手动下载
1414

1515
OS type | Minimun Supported Version
1616
--------|-------------------
@@ -30,17 +30,9 @@ Server | Microsoft Windows Server 2003 Family
3030

3131
~~作者弃坑了~~
3232

33-
请通过issue来反馈任何bug以及程序问题,bug会及时得到修复。
34-
35-
## New Feature
36-
37-
如果服务无法更新hosts 请尝试安装静默启动
38-
39-
打开choose.exe后输入11按下回车 重启即可
40-
4133
## 警告
4234

43-
1. **请不要删除`# Copyright (c) 2014-2017, racaljk.`(作为程序的识别位点) 否则 有可能发生不可预料的后果**
35+
1. **请不要删除`# Copyright (c) 2017-2018, googlehosts members.`(作为程序的识别位点) 否则 有可能发生不可预料的后果**
4436
2. **如果先前没有使用本项目hosts文件 而使用了其他项目的hosts文件的 请重置hosts文件(具体方法看下方使用说明)后 再使用本程序**
4537

4638
## How to use?
@@ -52,15 +44,25 @@ main program file: `tool.exe`
5244
- 无参数运行`tool.exe` 用来更新hosts文件 如有更新 程序会备份原有的hosts文件
5345
- 运行`choose.exe` 来选择更多的运行选项
5446

47+
## 现有功能
48+
49+
* 启动程序后,从指定的源自动更新hosts文件
50+
* 程序会保留先前的自定义hosts,如果您有使用其他的hosts,请在备份好自己自定义的hosts之后重置hosts文件
51+
* 可选的以服务启动,在后台自动更新hosts文件
52+
* 可选的以用户态模式(静默)开机启动,在后台自动更新hosts文件 (打开`choose.exe`后输入11按下回车)
53+
* 程序会留下一份更新备份,如出现问题可直接更改备份文件名还原
54+
* 程序可以直接重置hosts文件
55+
* 可选的在服务出现问题时,使用 Debug 模式进行监听服务的状态
56+
5557
## 注意事项
5658

5759
1. 如果安装服务 程序会往`%SystemRoot%`下复制一个`hoststools.exe`文件用来作为服务启动的主程序
5860
2. 安装服务后 日志文件会保存在`C:\Hosts_Tool_log.log`下 您可以通过查看日志观察服务的工作状态
59-
7. 本程序一切有更改hosts文件的行为前都会先备份hosts文件。
61+
3. 本程序一切有更改hosts文件的行为前都会先备份hosts文件。
6062
4. 请间隔一段时间后清理`%SystemRoot%\system32\drivers\etc\`文件夹 (程序加入了询问删除早期备份文件的功能)
6163
5. 如有任何疑问或bug反馈,请开新的issue (如是服务问题请附上日志文件)
6264

6365

64-
## Code license:
66+
## License:
6567

6668
General Public License Version 3

header/diff.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This source code was published under GPL v3
33
*
4-
* Copyright (C) 2017 Too-Naive
4+
* Copyright (C) 2016-2018 Too-Naive
55
*
66
*/
77

header/download.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This source code was published under GPL v3
33
*
4-
* Copyright (C) 2017 Too-Naive
4+
* Copyright (C) 2016-2018 Too-Naive
55
*
66
*/
77
//download.hpp(Re-edit)

header/pipedebug.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This source code was published under GPL v3
33
*
4-
* Copyright (C) 2017 Too-Naive
4+
* Copyright (C) 2016-2018 Too-Naive
55
*
66
*/
77
#pragma once

header/ptrerr.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This source code was published under GPL v3
33
*
4-
* Copyright (C) 2017 Too-Naive
4+
* Copyright (C) 2016-2018 Too-Naive
55
*
66
*/
77
//ptrerr.hpp

object-runwithcode/choose.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This source code was published under GPL v3
33
*
4-
* Copyright (C) 2016 Too-Naive
4+
* Copyright (C) 2016-2018 Too-Naive
55
*
66
*/
77

tool.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This source code was published under GPL v3
33
*
4-
* Copyright (C) 2017 Too-Naive
4+
* Copyright (C) 2016-2018 Too-Naive
55
*
66
*/
77

@@ -56,7 +56,7 @@
5656
#define objectwebsite _T("https:\x2f\x2fgithub.com/HostsTools/Windows")
5757
//end.
5858

59-
#define ConsoleTitle _T("googlehosts tool v2.2.0 Build time:Sep. 7th, '17")
59+
#define ConsoleTitle _T("googlehosts tool v2.2.1 Build time:Jan. 17th, '18")
6060

6161
#define CASE(x,y) case x : y; break;
6262
#define DEBUGCASE(x) CASE(x,___debug_point_reset(x))
@@ -140,7 +140,7 @@ Example:\n\
140140
#define copyrightshow _T("\
141141
------------------------------------------------------------\n\
142142
Hosts Tool for Windows Console by: Too-Naive\n\
143-
Copyright (C) 2017 @Too-Naive License:General Public License\n\
143+
Copyright (C) 2016-2018 @Too-Naive License:General Public License\n\
144144
------------------------------------------------------------\n")
145145

146146
//Global variable
@@ -666,7 +666,7 @@ void Func_Service_Install(bool _q){
666666
SC_HANDLE shMang=_pNULL_,shSvc=_pNULL_;
667667
if (_q){
668668
_tprintf(_T(" LICENSE:General Public License\n \
669-
Copyright (C) 2017 @Too-Naive\n\n"));
669+
Copyright (C) 2016-2018 @Too-Naive\n\n"));
670670
_tprintf(_T(" Bug report:[hidden] \n\t \
671671
Or open new issue\n------------------------------------------------------\n\n"));
672672
}
@@ -846,7 +846,7 @@ DWORD __stdcall NormalEntry(LPVOID){
846846
SetCurrentDirectory(szline);
847847
if (!bIsServiceMode){
848848
_tprintf(_T(" LICENSE:General Public License\n%s\n\
849-
Copyright (C) 2017 @Too-Naive\n"),welcomeShow);
849+
Copyright (C) 2016-2018 @Too-Naive\n"),welcomeShow);
850850
_tprintf(_T(" Project website:%s\n"),objectwebsite);
851851
_tprintf(_T(" Bug report:[hidden] \n\t\
852852
Or open new issue\n\n\n"));
@@ -855,7 +855,7 @@ DWORD __stdcall NormalEntry(LPVOID){
855855
if (request_client) ___pipeopen(),___pipesendmsg(_T("\nMessage from service:\n\n"));
856856
Func_FastPMNTS(_T("Open log file.\n"));
857857
___checkEx(_T("LICENSE:General Public License\n"),1);
858-
___checkEx(_T("Copyright (C) 2017 Too-Naive\n"),0);
858+
___checkEx(_T("Copyright (C) 2016-2018 Too-Naive\n"),0);
859859
___checkEx(_T("Bug report:[hidden]\n"),0);
860860
___checkEx(_T(" Or open new issue.(https://github.com/HostsTools/Windows)\n"),0);
861861
}
@@ -912,16 +912,16 @@ DWORD __stdcall NormalEntry(LPVOID){
912912
throw buf1;
913913
if (!(_=_tfopen(ReservedFile,_T("w"))))
914914
throw ReservedFile;
915-
while (!feof(fp)){//checking is end of file?
915+
while (!feof(fp)){ //checking is end of file?
916916
//to prevent print complex line
917917
memset(szline,0,sizeof(szline));
918918
_fgetts(szline,localbufsize,fp);
919-
if (*szline==_T('#')) {//fast check is commit
920-
if (_tcsstr(szline,_T("\x72\x61\x63\x61\x6c\x6a\x6b")))
921-
break; else
919+
if (*szline==_T('#')) { //fast check is comment
922920
//File original hosts start
923921
if (_tcsstr(szline,_T("googlehosts members")))
924922
break; else
923+
if (_tcsstr(szline,_T("\x72\x61\x63\x61\x6c\x6a\x6b")))
924+
break; //else
925925
// check is need ignore the commits
926926
if (bIgnoreCommit) continue;
927927
}

0 commit comments

Comments
 (0)