|
|
只走 HTTPS 443
SyncTimeByBaidu.bat
- @echo off
- cd /d "%~dp0"
- %1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
- setlocal enabledelayedexpansion
- certutil -urlcache -split -f "https://www.baidu.com" "%temp%\baidu.tmp" >nul 2>&1
- for /f "tokens=2 delims==" %%i in ('findstr /c:"window.baidu_time" "%temp%\baidu.tmp" 2^>nul') do set t=%%i
- if not defined t for /f "tokens=2 delims==" %%i in ('findstr /c:"dateModified" "%temp%\baidu.tmp" 2^>nul') do set t=%%i
- if not defined t exit /b
- set t=%t:"=%
- set t=%t:T= %
- for /f "tokens=1,2 delims= " %%a in ("%t%") do (
- set d=%%a
- set tm=%%b
- )
- set d=%d:-=/%
- for /f "tokens=1-3 delims=:" %%x in ("%tm%") do set tm=%%x:%%y:%%z
- date %d%
- time %tm%
- del "%temp%\baidu.tmp" >nul 2>&1
- exit
复制代码 |
|