Join GitHub today

GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.

Sign up

Python nbtstat + smb_version without third party packages

Python nbtstat + smb_version without third party packages

用 Python 实现的一个类似 nbtscan 的东西,外边包了一层多线程

默认通过 NBNS 协议获取 NetBIOS Name,然后通过 139(默认) 或者 445 探测系统相关信息

写的比较粗糙,Python2 或 Python3 > 3.2 目测 都能用

Usage:

python inbt.py ip [port 139|445]

Example:

python inbt.py 172.16.9.0/24

Result:

172.16.9.129    WORKGROUP\WIN-I8S0A16RCR7         # IP    Unique Name\Group Name
------------------------------------------------- # NetBIOS Names    U[Unique]/G[Group]    Service
WIN-I8S0A16RCR7	U	Server Service
WIN-I8S0A16RCR7	U	Workstation Service
WORKGROUP      	G	Domain Name
------------------------------------------------- # SMB Version Info
WORKGROUP\WIN-I8S0A16RCR7
Windows 7 Professional 7601 Service Pack 1|Windows 7 Professional 6.1|
Major Version: 6
Minor Version: 1
Bulid Number: 7601
NTLM Current Revision: 15
NetBIOS domain name: WIN-I8S0A16RCR7
NetBIOS computer name: WIN-I8S0A16RCR7
DNS domain name: WIN-I8S0A16RCR7
DNS computer name: WIN-I8S0A16RCR7
Time stamp: 2018-05-14 22:42:21.298930

Reference:

NetBIOS Over TCP/IP

C#版本的smb_version

NETBIOS主机名编码算法

RFC 1002