Created
February 27, 2015 08:15
-
-
Save Congee/ff6b5b07614c51167f79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urNad nbtscan-1.5.1~/nbtscan.c nbtscan-1.5.1/nbtscan.c | |
--- nbtscan-1.5.1~/nbtscan.c 2003-06-06 14:14:00.000000000 +0200 | |
+++ nbtscan-1.5.1/nbtscan.c 2008-05-09 14:38:59.000000000 +0200 | |
@@ -111,7 +111,7 @@ | |
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 @@ | |
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment