Skip to content

☆ 在NBT(NetBIOS over TCP/IP)的Cache中增加特定后缀的NetBIOS名

编辑%systemroot%\system32\drivers\etc\lmhosts文件如下:

192.168.0.1 scz #PRE

在cmd.exe中执行nbtstat -R、nbtstat -c:

              NetBIOS Remote Cache Name Table

    Name              Type       Host Address    Life [sec]
------------------------------------------------------------
SCZ            <03>  UNIQUE          192.168.0.1         -1
SCZ            <00>  UNIQUE          192.168.0.1         -1
SCZ            <20>  UNIQUE          192.168.0.1         -1

缺省增加了<00>、<03>、<20>。如果想增加<1B>,编辑lmhosts文件如下:

192.168.0.1 scz #PRE 192.168.0.1 "SCZ \0x1B" #PRE

在cmd.exe中执行nbtstat -R、nbtstat -c:

              NetBIOS Remote Cache Name Table

    Name              Type       Host Address    Life [sec]
------------------------------------------------------------
SCZ            <1B>  UNIQUE          192.168.0.1         -1
SCZ            <03>  UNIQUE          192.168.0.1         -1
SCZ            <00>  UNIQUE          192.168.0.1         -1
SCZ            <20>  UNIQUE          192.168.0.1         -1

注意串"SCZ \0x1B",连带后缀一起总共是16个字符,否则"nbtstat -R" 时视之为无效条目。无双引号时scz大小写不敏感,统一转换成大写SCZ。有双引号时 SCZ大小写敏感。

参<>。