diff --git a/FPEngine.cc b/FPEngine.cc index 65cc4e265..157b4791d 100644 --- a/FPEngine.cc +++ b/FPEngine.cc @@ -662,8 +662,8 @@ FPEngine6::~FPEngine6() { } -/* From FPmodel.cc. */ -extern struct model FPmodel; +/* From FPModel.cc. */ +extern struct model FPModel; extern double FPscale[][2]; extern FingerMatch FPmatches[]; @@ -801,7 +801,7 @@ static struct feature_node *vectorize(const FingerPrintResultsIPv6 *FPR) { resps[FPR->fp_responses[i]->probe_id].setTime(&FPR->fp_responses[i]->senttime); } - nr_feature = get_nr_feature(&FPmodel); + nr_feature = get_nr_feature(&FPModel); features = new feature_node[nr_feature + 1]; for (i = 0; i < nr_feature; i++) { features[i].index = i + 1; @@ -929,15 +929,15 @@ static void classify(FingerPrintResultsIPv6 *FPR) { double *values; struct label_prob *labels; - nr_class = get_nr_class(&FPmodel); + nr_class = get_nr_class(&FPModel); features = vectorize(FPR); values = new double[nr_class]; labels = new struct label_prob[nr_class]; - apply_scale(features, get_nr_feature(&FPmodel), FPscale); + apply_scale(features, get_nr_feature(&FPModel), FPscale); - predict_values(&FPmodel, features, values); + predict_values(&FPModel, features, values); for (i = 0; i < nr_class; i++) { labels[i].label = i; labels[i].prob = 1.0 / (1.0 + exp(-values[i])); diff --git a/FPmodel.cc b/FPModel.cc similarity index 99% rename from FPmodel.cc rename to FPModel.cc index 6d9d1bb80..0c84551b9 100644 --- a/FPmodel.cc +++ b/FPModel.cc @@ -1991,7 +1991,7 @@ static double _w[] = { static int _labels[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64}; -struct model FPmodel = { +struct model FPModel = { {0}, 65, 659, diff --git a/Makefile.in b/Makefile.in index 3a5444213..c6aa3232e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -95,20 +95,20 @@ NSE_OBJS+=nse_openssl.o nse_ssl_cert.o endif endif -export SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc FPEngine.cc FPmodel.cc output.cc payload.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc traceroute.cc portreasons.cc xml.cc $(NSE_SRC) @COMPAT_SRCS@ +export SRCS = main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc FPEngine.cc FPModel.cc output.cc payload.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc traceroute.cc portreasons.cc xml.cc $(NSE_SRC) @COMPAT_SRCS@ export HDRS = charpool.h FingerPrintResults.h global_structures.h idle_scan.h MACLookup.h nmap_amigaos.h nmap_dns.h nmap_error.h nmap.h NmapOps.h NmapOutputTable.h nmap_rpc.h nmap_tty.h nmap_winconfig.h osscan.h osscan2.h FPEngine.h output.h payload.h portlist.h protocols.h scan_engine.h service_scan.h services.h TargetGroup.h Target.h targets.h tcpip.h timing.h utils.h traceroute.h portreasons.h xml.h $(NSE_HDRS) -OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o osscan2.o FPEngine.o FPmodel.o output.o payload.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o MACLookup.o nmap_tty.o nmap_dns.o traceroute.o portreasons.o xml.o $(NSE_OBJS) @COMPAT_OBJS@ +OBJS = main.o nmap.o targets.o tcpip.o nmap_error.o utils.o idle_scan.o osscan.o osscan2.o FPEngine.o FPModel.o output.o payload.o scan_engine.o timing.o charpool.o services.o protocols.o nmap_rpc.o portlist.o NmapOps.o TargetGroup.o Target.o FingerPrintResults.o service_scan.o NmapOutputTable.o MACLookup.o nmap_tty.o nmap_dns.o traceroute.o portreasons.o xml.o $(NSE_OBJS) @COMPAT_OBJS@ # %.o : %.cc -- nope this is a GNU extension .cc.o: $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -# FPmodel.cc contains large numeric tables that exceed the capacity of +# FPModel.cc contains large numeric tables that exceed the capacity of # debugging output with GCC 4.6.0 on AIX, causing "Error: value of 121716 too # large for field of 2 bytes". Disable debugging for this one file. -FPmodel.o: CXXFLAGS += -g0 +FPModel.o: CXXFLAGS += -g0 all: @LUA_BUILD@ @LIBLINEAR_BUILD@ @PCAP_BUILD@ @PCRE_BUILD@ @DNET_BUILD@ @NBASE_BUILD@ @NSOCK_BUILD@ @NCAT_BUILD@ netutil_build $(MAKE) $(TARGET) $(BUILDZENMAP) $(BUILDNDIFF) $(BUILDNPING)