Skip to content

Commit

Permalink
baseline is v1.5.1a
Browse files Browse the repository at this point in the history
  • Loading branch information
lifenjoiner committed Mar 22, 2019
0 parents commit d3fc976
Show file tree
Hide file tree
Showing 19 changed files with 9,611 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

# config
config.status
config.log
*.old
340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Version 1.5.1 - June 2003

- Fixed segmentation fault when using -f option (noticed by Brian Lovrin)
- Fixed printing ugliness (noticed by Darren Critchley)
- Changed version number :) (1.5 said that it is 1.0.3 - now it proudly says 1.5.1)

Version 1.5 - May 2002

- Fixed a bug in displaying of 15-character NetBIOS names (15th character wasn't displayed). Bug reported by Tom Kustner (Tom.Kustner@mortgage.wellsFargo.COM), Kenny Breck (KCBreck@NetZero.net) and Richard IJzermans (richard.ijzermans@lgphilips-displays.com)
- Fixed a bug in interpreting netmask /32 and /0. Patch provided by Thomas Poindessous (thomas@poindessous.com) for Debian Linux
- List of hosts to scan can now be read from stdin as well as from file. Suggested by Kevin Kadow (kadokev@msg.net)
- Fixed a bug in timing. (nbtscan waited for two seconds after scanning not doing anything). Reported by Ceri Hopkins (ceri@sandc.demon.co.uk)
- Nbtscan now works on Darwin. Patches provided by Mohammad A. Haque (mhaque@haque.net)
- timeout option -t is now in milliseconds, not seconds
- Fixed some Solaris portability problems. Patches provided by Petter Reinholdtsen (pere@hungry.com)

Version 1.0.3 - February 2002

- NBTscan now returns meaningful exit code (patch by James Troup for Debian Linux)
- Added /etc/hosts and lmhosts format output (suggested by Anahuac de Paula Gil and Sigmund Baginov)
- configure script now honours --prefix argument (patch by Petter Reinholdtsen)
- Error messages now include IP address that caused error
- NBTscan accepts a file with a list of IP addresses to scan (suggested by Omas Jakobsson)
- Service number is printed for unknown NetBIOS services in -h mode (suggested by Dan Wright)
- Fixed some compile-time warnings on Linux
- Corrected some typos

Version 1.0.2 - March 30, 2000

- Added retransmits (-m option) (Several people asked)
- Added output bandwidth throttling (-b option) (Suggested
by Jason Garman <jgarman@wedgie.org>)
- Rewrote sending queries and receiving answers part for more
reliable scanning of large blocks of addresses. (Suggested
by Jason Garman <jgarman@wedgie.org>)
- Added script-friendly output option (-s) (Suggested by
Patrick Heim <Maldoror@Worldnet.att.net>)
- Added printing of human-readable NetBIOS service names (-h)
(Suggested by Patrick Heim <Maldoror@Worldnet.att.net>)
- Added -q command line option that suppresses printing
banners and error messages. (Suggested by Sam Bayne
<sbayne@sccd.ctc.edu>)
- Rewrote parse_response completely. This allows for better
parsing of Samba servers' responses. (Bug reported by
Sam Bayne <sbayne@sccd.ctc.edu>)
- Added -d command line option which makes whole packets
get printed
- Various cosmetic improvements including fixing some
spelling errors

Version 1.0.1 - May 5, 1999

- Fixed incorrect parsing of MAC address in parse_response()
which made last byte of MAC addresses appear as 00. Bug
pointed by Joseph Moon.
- Changed message saying "Warning: -r option not supported
under NT." to more accurate saying: "Warning: -r option not
supported under Windows."
- Corrected a typo in README.
35 changes: 35 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
INSTALL=@INSTALL@
CC=@CC@
LIBS=@LIBS@
CFLAGS = @CFLAGS@
OBJECTS=nbtscan.o statusq.o range.o list.o
DEFS=@DEFS@
TARGET=@TARGET@

prefix = @prefix@
exec_prefix = @exec_prefix@
BINDIR = @bindir@

nbtscan: $(OBJECTS)
$(CC) $(CFLAGS) -o nbtscan $(OBJECTS) $(LIBS)

install:
$(INSTALL) $(TARGET) $(BINDIR)/$(TARGET)

nbtscan.o: nbtscan.c statusq.h range.h list.h
$(CC) $(CFLAGS) $(DEFS) -c nbtscan.c

statusq.o: statusq.c statusq.h
$(CC) $(CFLAGS) $(DEFS) -c statusq.c

range.o: range.c range.h
$(CC) $(CFLAGS) $(DEFS) -c range.c

list.o: list.c list.h
$(CC) $(CFLAGS) $(DEFS) -c list.c

clean:
-rm $(OBJECTS) nbtscan

distclean: clean
-rm config.cache config.log config.status Makefile
124 changes: 124 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
NBTscan version 1.5.1 Copyright (C) 1999-2003 Alla Bezroutchko

NBTscan is a program for scanning IP networks for NetBIOS name
information. It sends NetBIOS status query to each address in
supplied range and lists received information in human
readable form. For each responded host it lists IP address,
NetBIOS computer name, logged-in user name and MAC address
(such as Ethernet).

See http://www.inetcat.org/software/nbtscan.html for
NBTscan homepage.

LICENSE.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program (in a file called COPYING); if not, write
to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
MA 02139, USA.

INSTALLATION.

NBTscan compiles and runs on Unix and Windows. I have tested it
on Windows NT 4.0, Windows 2000, FreeBSD 4.3, OpenBSD 2.8
and RedHat Linux 7.1. It should also compile and run on Solaris
and other Linuxes as well. Steve Coleman
<Steve.Coleman@jhuapl.edu> ported NBTscan to Solaris, HP-UX and
OSF/1 and fixed several bugs. He reports that NBTscan also runs
on IRIX/SGI with minor problems. Mohammad A. Haque
<mhaque@haque.net> ported nbtscan to Darwin.

Windows:

To compile this under Windows you will need Cygwin. You can
Download and install Cygwin from
http://sources.redhat.com/cygwin/
Start Cygwin shell and proceed from there as in Unix
installation

Unix:
Do

./configure

make

make install

That's all.

RUNNING.

Usage:

nbtscan [-v] [-d] [-e] [-l] [-t timeout] [-b bandwidth] [-r] [-q] [-s separator] [-m retransmits] (-f filename)|(<scan_range>)
-v verbose output. Print all names received
from each host
-d dump packets. Print whole packet contents.
-e Format output in /etc/hosts format.
-l Format output in lmhosts format.
Cannot be used with -v, -s or -h options.
-t timeout wait timeout imilliseconds for response.
Default 1.
-b bandwidth Output throttling. Slow down output
so that it uses no more that bandwidth bps.
Useful on slow links, so that ougoing queries
don't get dropped.
-r use local port 137 for scans. Win95 boxes
respond to this only.
You need to be root to use this option on Unix.
-q Suppress banners and error messages,
-s separator Script-friendly output. Don't print
column and record headers, separate fields
with separator.
-h Print human-readable names for services.

Can only be used with -v option.
-m retransmits Number of retransmits. Default 0.
-f filename Take IP addresses to scan from file filename
-f - makes nbtscan take IP addresses from stdin.
<scan_range> what to scan. Can either be single IP
like 192.168.1.1 or
range of addresses in one of two forms:
xxx.xxx.xxx.xxx/xx or xxx.xxx.xxx.xxx-xxx.
Examples:
nbtscan -r 192.168.1.0/24
Scans the whole C-class network.
nbtscan 192.168.1.25-137
Scans a range from 192.168.1.25 to 192.168.1.137
nbtscan -v -s : 192.168.1.0/24
Scans C-class network. Prints results in script-friendly
format using colon as field separator.
Produces output like that:
192.168.0.1:NT_SERVER:00U
192.168.0.1:MY_DOMAIN:00G
192.168.0.1:ADMINISTRATOR:03U
192.168.0.2:OTHER_BOX:00U
...
nbtscan -f iplist
Scans IP addresses specified in file iplist.


BUGS/LIMITATIONS

Windows version has a certain limitation: you cannot scan Win95
hosts with it because Windows 95 always sends responses to name
queries to port 137, and you cannot bind to port 137 under
Windows (it is already taken by Windows itself).

When talking to Samba boxes nbtscan always reports the MAC
address being 00-00-00-00-00-00. This is because Samba sends
that as MAC address. Nbtscan just displays what it gets.

Report bugs to alla@inetcat.org (that's me). I cannot promise to
do anything but I might well want fix it. Remember: no warranty.
Loading

0 comments on commit d3fc976

Please sign in to comment.