Loading Makefile +5 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ DEFINES = CFLAGS = -g -ggdb $(FLAGS2) $(INCLUDES) $(DEFINES) -Wall -O3 -Wno-format .SUFFIXES: .c .cpp all: bin/scan2text bin/masscan # just compile everything in the 'src' directory. Using this technique # means that include file dependencies are broken, so sometimes when # the program crashes unexpectedly, 'make clean' then 'make' fixes the Loading @@ -71,6 +73,9 @@ OBJ = $(addprefix tmp/, $(notdir $(addsuffix .o, $(basename $(SRC))))) bin/masscan: $(OBJ) $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS) bin/scan2text: util/scan2text.c $(CC) $(CFLAGS) -o $@ util/scan2text.c $(LIBS) clean: rm tmp/*.o rm bin/masscan Loading src/main.c +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ uint64_t foo_timestamp = 0; uint64_t foo_count = 0; /*************************************************************************** * We create a pair of transnit/receive threads for each network adapter. * We create a pair of transmit/receive threads for each network adapter. * This structure contains the parameters we send to each pair. ***************************************************************************/ struct ThreadPair { Loading util/scan2text.c +10 −7 Original line number Diff line number Diff line Loading @@ -139,8 +139,11 @@ db_print(const struct BannerDB *db) } } /*************************************************************************** * used for some banners to keep track of the most popular ones ***************************************************************************/ void db_lookup(struct BannerDB *db, const unsigned char *str, unsigned length) db_lookup(struct BannerDB *db, const char *str, unsigned length) { struct BannerRecord *rec; uint64_t hash = 0; Loading Loading @@ -371,42 +374,42 @@ parse_banner(const struct Configuration *conf, unsigned char *buf, size_t buf_le } } int is_nominum(const unsigned char *px, size_t len) int is_nominum(const char *px, size_t len) { if (len >= 7 && memcmp(px, "Nominum", 7) == 0) return 1; else return 0; } int is_dnsmasq(const unsigned char *px, size_t len) int is_dnsmasq(const char *px, size_t len) { if (len >= 7 && memcmp(px, "dnsmasq", 7) == 0) return 1; else return 0; } int is_powerdns(const unsigned char *px, size_t len) int is_powerdns(const char *px, size_t len) { if (len >= 8 && memcmp(px, "PowerDNS", 8) == 0) return 1; else return 0; } int is_nsd(const unsigned char *px, size_t len) int is_nsd(const char *px, size_t len) { if (len >= 4 && memcmp(px, "NSD ", 4) == 0) return 1; else return 0; } int is_unbound(const unsigned char *px, size_t len) int is_unbound(const char *px, size_t len) { if (len >= 7 && memcmp(px, "unbound", 7) == 0) return 1; else return 0; } int is_bind(const unsigned char *px, size_t len) int is_bind(const char *px, size_t len) { if (memcmp(px, "yamutech-bind", 13) == 0 && len >= 13) return 1; Loading Loading
Makefile +5 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,8 @@ DEFINES = CFLAGS = -g -ggdb $(FLAGS2) $(INCLUDES) $(DEFINES) -Wall -O3 -Wno-format .SUFFIXES: .c .cpp all: bin/scan2text bin/masscan # just compile everything in the 'src' directory. Using this technique # means that include file dependencies are broken, so sometimes when # the program crashes unexpectedly, 'make clean' then 'make' fixes the Loading @@ -71,6 +73,9 @@ OBJ = $(addprefix tmp/, $(notdir $(addsuffix .o, $(basename $(SRC))))) bin/masscan: $(OBJ) $(CC) $(CFLAGS) -o $@ $(OBJ) $(LIBS) bin/scan2text: util/scan2text.c $(CC) $(CFLAGS) -o $@ util/scan2text.c $(LIBS) clean: rm tmp/*.o rm bin/masscan Loading
src/main.c +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ uint64_t foo_timestamp = 0; uint64_t foo_count = 0; /*************************************************************************** * We create a pair of transnit/receive threads for each network adapter. * We create a pair of transmit/receive threads for each network adapter. * This structure contains the parameters we send to each pair. ***************************************************************************/ struct ThreadPair { Loading
util/scan2text.c +10 −7 Original line number Diff line number Diff line Loading @@ -139,8 +139,11 @@ db_print(const struct BannerDB *db) } } /*************************************************************************** * used for some banners to keep track of the most popular ones ***************************************************************************/ void db_lookup(struct BannerDB *db, const unsigned char *str, unsigned length) db_lookup(struct BannerDB *db, const char *str, unsigned length) { struct BannerRecord *rec; uint64_t hash = 0; Loading Loading @@ -371,42 +374,42 @@ parse_banner(const struct Configuration *conf, unsigned char *buf, size_t buf_le } } int is_nominum(const unsigned char *px, size_t len) int is_nominum(const char *px, size_t len) { if (len >= 7 && memcmp(px, "Nominum", 7) == 0) return 1; else return 0; } int is_dnsmasq(const unsigned char *px, size_t len) int is_dnsmasq(const char *px, size_t len) { if (len >= 7 && memcmp(px, "dnsmasq", 7) == 0) return 1; else return 0; } int is_powerdns(const unsigned char *px, size_t len) int is_powerdns(const char *px, size_t len) { if (len >= 8 && memcmp(px, "PowerDNS", 8) == 0) return 1; else return 0; } int is_nsd(const unsigned char *px, size_t len) int is_nsd(const char *px, size_t len) { if (len >= 4 && memcmp(px, "NSD ", 4) == 0) return 1; else return 0; } int is_unbound(const unsigned char *px, size_t len) int is_unbound(const char *px, size_t len) { if (len >= 7 && memcmp(px, "unbound", 7) == 0) return 1; else return 0; } int is_bind(const unsigned char *px, size_t len) int is_bind(const char *px, size_t len) { if (memcmp(px, "yamutech-bind", 13) == 0 && len >= 13) return 1; Loading