域名服务器 DNS
域名服务器DNS(将域名转换为IP地址的一种服务)eg:记不住身份证号,但可以通过独一的称号来知道身份证号
电脑中有一个位置可用来讲域名跟IP配对:C:\Windows\System32\drivers\etc\hosts
hosts文件中的内容
-----------------------------------------------------------------------------------------------------------------------------------------
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost 环网地址
# ::1 localhost
127.0.0.1 localhost
14.215.177.39 www.zhihu.com (IP 域名 )操作行
...............................................................................................................................................................................
hosts文件中进项上行操作可更改域名
1)更改hosts文件
2) cmd中 ping www. ×××.com 查
百度本来域名为 14.215.177.39
知乎本来域名为 240e:bf:c800:4200:140::
注:hosts文件更改后记得覆盖原文件,此处知乎域名仍未更改
成功操作后知乎域名变成百度域名
病毒:域名劫持(不好使了,有保护措施)
实例:钓鱼网站通过更改用户的hosts文件伪造淘宝IP引诱付款
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义