Skip to content

Commit 26c6315

Browse files
committed
Import 1.0.2 version
0 parents  commit 26c6315

File tree

18 files changed

+5569
-0
lines changed

18 files changed

+5569
-0
lines changed

COPYING

309 KB
Binary file not shown.

ChangeLog

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Version 1.0.2 - March 30, 2000
2+
3+
- Added retransmits (-m option) (Several people asked)
4+
- Added output bandwidth throttling (-b option) (Suggested
5+
by Jason Garman <[email protected]>)
6+
- Rewrote sending queries and receiving answers part for more
7+
reliable scanning of large blocks of addresses. (Suggested
8+
by Jason Garman <[email protected]>)
9+
- Added script-friendly output option (-s) (Suggested by
10+
Patrick Heim <[email protected]>)
11+
- Added printing of human-readable NetBIOS service names (-h)
12+
(Suggested by Patrick Heim <[email protected]>)
13+
- Added -q command line option that suppresses printing
14+
banners and error messages. (Suggested by Sam Bayne
15+
16+
- Rewrote parse_response completely. This allows for better
17+
parsing of Samba servers' responses. (Bug reported by
18+
Sam Bayne <[email protected]>)
19+
- Added -d command line option which makes whole packets
20+
get printed
21+
- Various cosmetic improvements including fixing some
22+
spelling errors
23+
24+
Version 1.0.1 - May 5, 1999
25+
26+
- Fixed incorrect parsing of MAC address in parse_response()
27+
which made last byte of MAC addresses appear as 00. Bug
28+
pointed by Joseph Moon.
29+
- Changed message saying "Warning: -r option not supported
30+
under NT." to more accurate saying: "Warning: -r option not
31+
supported under Windows."
32+
- Corrected a typo in README.

Makefile.in

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
INSTALL=@INSTALL@
2+
CC=@CC@
3+
LIBS=@LIBS@
4+
CFLAGS = @CFLAGS@
5+
OBJECTS=nbtscan.o statusq.o range.o list.o
6+
DEFS=@DEFS@
7+
TARGET=@TARGET@
8+
BINDIR=@BINDIR@
9+
10+
nbtscan: $(OBJECTS)
11+
$(CC) $(CFLAGS) -o nbtscan $(OBJECTS) $(LIBS)
12+
13+
install:
14+
$(INSTALL) $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
15+
16+
nbtscan.o: nbtscan.c statusq.h range.h list.h
17+
$(CC) $(CFLAGS) $(DEFS) -c nbtscan.c
18+
19+
statusq.o: statusq.c statusq.h
20+
$(CC) $(CFLAGS) $(DEFS) -c statusq.c
21+
22+
range.o: range.c range.h
23+
$(CC) $(CFLAGS) $(DEFS) -c range.c
24+
25+
list.o: list.c list.h
26+
$(CC) $(CFLAGS) $(DEFS) -c list.c
27+
28+
clean:
29+
-rm $(OBJECTS) nbtscan
30+
31+
distclean: clean
32+
-rm config.cache config.log config.status Makefile

README

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
NBTscan version 1.0.2. Copyright (C) 1999-2000 Alla Bezroutchko
2+
3+
NBTscan is a program for scanning IP networks for NetBIOS name
4+
information. It sends NetBIOS status query to each address in
5+
supplied range and lists received information in human
6+
readable form. For each responded host it lists IP address,
7+
NetBIOS computer name, logged-in user name and MAC address
8+
(such as Ethernet).
9+
10+
See http://www.abb.aha.ru/software/nbtscan.html for
11+
NBTscan homepage.
12+
13+
LICENSE.
14+
15+
This program is free software; you can redistribute it and/or modify
16+
it under the terms of the GNU General Public License as published by
17+
the Free Software Foundation; either version 2 of the License, or
18+
(at your option) any later version.
19+
20+
This program is distributed in the hope that it will be useful,
21+
but WITHOUT ANY WARRANTY; without even the implied warranty of
22+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23+
GNU General Public License for more details.
24+
25+
You should have received a copy of the GNU General Public License
26+
along with this program (in a file called COPYING); if not, write
27+
to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
28+
MA 02139, USA.
29+
30+
INSTALLATION.
31+
32+
NBTscan compiles and runs on Unix and Windows. I have tested it
33+
on Windows NT 4.0, Windows 95, Windows 98, FreeBSD 2.2.7,
34+
FreeBSD 3.1, and Solaris 2.6/Intel. Steve Coleman
35+
<[email protected]> ported NBTscan to Solaris, HP-UX and
36+
OSF/1 and fixed several bugs. He reports that NBTscan also runs
37+
on IRIX/SGI with minor problems.
38+
39+
Windows:
40+
41+
To compile this under Windows you will need Cygwin. You can
42+
download it from http://sourceware.cygnus.com/cygwin/download.html
43+
Install it and start the shell. Make directory named bin in
44+
root directory of the drive you have installed Cygwin to.
45+
Suppose you have installed Cygwin into "C:\Program Files\cygnus".
46+
Then you should create directory c:\bin. Then you will need
47+
to mount real bin directory to /bin with the command like that:
48+
49+
mount "/program files/cygnus/cygwin-b20/H-i586-cygwin32/bin" /bin
50+
51+
Untar nbtscan with:
52+
53+
tar zxvf nbtscan.tar.gz
54+
55+
Go to nbtscan directory and run a script named 'configure' like
56+
that:
57+
58+
./configure
59+
60+
Type 'make' at Cygwin command prompt. This will compile and
61+
build nbtscan.exe. If make finishes without errors, type
62+
'make install'. This will copy nbtscan.exe to location specified
63+
in BINDIR (c: by default).
64+
65+
To run it independently (without Cygwin) find file named
66+
cygwin1.dll and copy it to winnt\system32 (or windows\system
67+
under Windows 95)
68+
69+
Unix:
70+
Do
71+
72+
./configure
73+
74+
make
75+
76+
make install
77+
78+
That's all.
79+
80+
RUNNING.
81+
82+
Usage: nbtscan [-v] [-d] [-t timeout] [-b bandwidth] [-r] [-q] [-s separator] <scan_range>
83+
-v verbose output. Print all names received
84+
from each host
85+
-d dump packets. Print whole packet contents.
86+
Cannot be used with -v, -s or -h options.
87+
-t timeout wait timeout seconds for response.
88+
Default 1.
89+
-b bandwidth Output throttling. Slow down output
90+
so that it uses no more that bandwidth bps.
91+
Useful on slow links, so that ougoing queries
92+
don't get dropped.
93+
-r use local port 137 for scans. Win95 boxes
94+
respond to this only.
95+
You need to be root to use this option on Unix.
96+
-q Suppress banners and error messages,
97+
-s separator Script-friendly output. Don't print
98+
column and record headers, separate fields with separator.
99+
-h Print human-readble names for services.
100+
Can only be used with -v option.
101+
-m retransmits Number of retransmits. Default 0.
102+
<scan_range> what to scan. Can either be single IP
103+
like 192.168.1.1 or
104+
range of addresses in one of two forms:
105+
xxx.xxx.xxx.xxx/xx or xxx.xxx.xxx.xxx-xxx.
106+
Examples:
107+
nbtscan -r 192.168.1.0/24
108+
Scans the whole C-class network.
109+
nbtscan 192.168.1.25-137
110+
Scans a range from 192.168.1.25 to 192.168.1.137
111+
nbtscan -v -s : 192.168.1.0/24
112+
Scans C-class network. Prints results in script-friendly
113+
format using colon as field separator.
114+
Produces output like that:
115+
192.168.0.1:NT_SERVER:00U
116+
192.168.0.1:MY_DOMAIN:00G
117+
192.168.0.1:ADMINISTRATOR:03U
118+
192.168.0.2:OTHER_BOX:00U
119+
...
120+
121+
BUGS/LIMITATIONS
122+
123+
Windows version has a certain limitation: you cannot scan Win95
124+
hosts with it because Windows 95 always sends responses to name
125+
queries to port 137, and you cannot bind to port 137 under
126+
Windows (it is already taken by Windows itself).
127+
128+
Report bugs to [email protected] (that's me). I cannot promise to
129+
do anything but I might well want fix it. Remember: no warranty.
130+
At least it's worth what you payed for it.

0 commit comments

Comments
 (0)