萬盛學電腦網

您现在的位置: 萬盛學電腦網 >> 電腦基礎知識 >  >> 電腦基本常識

驗證 Win7 hosts 檔案狀態:ping localhost 快速檢測 DNS 劫持

惡意軟體常竄改 C:\Windows\System32\drivers\etc\hosts 將熱門網域導向惡意 IP。用 ping localhost 快速驗證 hosts 檔完整性。

  1. Win+R → cmd 開啟命令提示字元。
  2. 輸入 ping localhost 按 Enter。
  3. 若顯示 從 ::1 回覆: 時間<1ms 或 127.0.0.1 正常回應,代表 hosts 檔未被竄改 (localhost 解析正確)。
  4. 若逾時、解析錯誤或回應異常 IP,表示 hosts 檔異常,需立即掃毒並還原 hosts 內容 (僅保留 127.0.0.1 localhost 與 ::1 localhost)。

此法可作為日常維護快速檢查手段,配合定期備份 hosts 檔更安心。

copyright © 萬盛學電腦網 all rights reserved