On 2008/01/14 22:04, Lewandowski Robert wrote:
> OpenBSD 4.2 + nbtscan from packages
> problems are:
[...]
> 2. "trash" like "Z.???C9P?????????" in output when checking hosts:
>
> # nbtscan -q -s : -v 10.0.0.187
> 10.0.0.187:ZLOTY Z.???C9P?????????:00U
> 10.0.0.187:ZLOTY Z.???C9P?????????:03U
this has been sitting in my tree way too long, ok anyone?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/nbtscan/Makefile,v
retrieving revision 1.9
diff -u -p -r1.9 Makefile
--- Makefile 15 Sep 2007 22:36:55 -0000 1.9
+++ Makefile 2 Jun 2008 15:10:31 -0000
@@ -2,8 +2,7 @@
COMMENT= NetBIOS name network scanner
-DISTNAME= nbtscan-1.5
-PKGNAME= ${DISTNAME}p0
+DISTNAME= nbtscan-1.5.1
CATEGORIES= net
MASTER_SITES= http://www.inetcat.net/software/
@@ -15,6 +14,8 @@ PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c
+
+WRKDIST= ${WRKDIR}/${DISTNAME}a
NO_REGRESS= Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/nbtscan/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 5 Apr 2007 16:20:11 -0000 1.4
+++ distinfo 2 Jun 2008 15:10:31 -0000
@@ -1,5 +1,5 @@
-MD5 (nbtscan-1.5.tar.gz) = G+VehD/xCv1B6ZgJKGbxlA==
-RMD160 (nbtscan-1.5.tar.gz) = haA8dao/5Hn0Lt5zerXVitisy9o=
-SHA1 (nbtscan-1.5.tar.gz) = Ly922MgYH9SVKuo7zD0wwl3798w=
-SHA256 (nbtscan-1.5.tar.gz) = Vj7eZAMPNGuYhhiENmjl0whfKdNBPNyThHp04Kn9P5w=
-SIZE (nbtscan-1.5.tar.gz) = 76791
+MD5 (nbtscan-1.5.1.tar.gz) = hbsIUHfDgLgqb/c+DeDBVA==
+RMD160 (nbtscan-1.5.1.tar.gz) = UTDZ5t7NM0aFkoH0X4oXmqAoakI=
+SHA1 (nbtscan-1.5.1.tar.gz) = QEHY9rWS+jELjTx5xWotMmPbqC8=
+SHA256 (nbtscan-1.5.1.tar.gz) = +fldVVU1bI1GelduadnTSL8qgh3tmoX4lbXm0h4qp+s=
+SIZE (nbtscan-1.5.1.tar.gz) = 82107
--- /dev/null Mon Jun 2 16:10:31 2008
+++ patches/patch-nbtscan_c Mon Jun 2 16:07:09 2008
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- nbtscan.c.orig Mon Jun 2 16:05:48 2008
++++ nbtscan.c Mon Jun 2 16:07:01 2008
+@@ -111,7 +111,7 @@ int d_print_hostinfo(struct in_addr addr, const struct
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+ strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
++ name[15]=0;
+ printf("%-17s Service: 0x%02x Flags: 0x%04x\n", name, service,
hostinfo->names[i].rr_flags);
+ }
+ };
+@@ -164,7 +164,7 @@ int v_print_hostinfo(struct in_addr addr, const struct
+ for(i=0; i< hostinfo->header->number_of_names; i++) {
+ service = hostinfo->names[i].ascii_name[15];
+ strncpy(name, hostinfo->names[i].ascii_name, 15);
+- name[16]=0;
++ name[15]=0;
+ unique = !(hostinfo->names[i].rr_flags & 0x0080);
+ if(sf) {
+ printf("%s%s%s%s", inet_ntoa(addr), sf, name, sf);