Ejemplo n.º 1
0
        public bool HostsFileIsOk()
        {
            uint recVerifyCode = VerifyCode.ReadFileRecVerifyCode("hostsverifycode");
            uint curVerifyCode = VerifyCode.MakeFileVerifyCode(strSysHosts);

            if (recVerifyCode == 0 || curVerifyCode == 0)
            {
                return(false);
            }
            return(recVerifyCode == curVerifyCode);
        }
Ejemplo n.º 2
0
        protected void Check()
        {
            uint verifyCode    = VerifyCode.ReadFileRecVerifyCode("dnsconfverifycode");
            uint curVerifyCode = VerifyCode.MakeFileVerifyCode(strFileName);

            //重新设置hosts校验
            if (verifyCode == 0 || verifyCode != curVerifyCode)
            {
                VerifyCode.WriteFileVerifyCode(0, "hostsverifycode");
            }
        }