diff --git a/.cvsignore b/.cvsignore index c5a26e6..3e7aed6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,2 @@ -kismet-*.tar.gz -kismet-*.tar.gz.asc +kismet-2008-05-R1.tar.gz +kismet-2008-05-R1.tar.gz.asc diff --git a/kismet-2007-01-R1-cast.patch b/kismet-2007-01-R1-cast.patch deleted file mode 100644 index af4f42f..0000000 --- a/kismet-2007-01-R1-cast.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- kismet-2007-01-R1b/gpsmap.cc.cast 2007-02-04 01:07:18.000000000 +0100 -+++ kismet-2007-01-R1b/gpsmap.cc 2007-02-04 01:09:04.000000000 +0100 -@@ -2242,12 +2242,8 @@ - pthread_attr_destroy(&attr); - - // Now wait for the threads to complete and come back -- int thread_status; -- for (int t = 0; t < numthreads; t++) { -- void *tmp; -- pthread_join(mapthread[t], &tmp); -- thread_status = reinterpret_cast(tmp); -- } -+ for (int t = 0; t < numthreads; t++) -+ pthread_join(mapthread[t], 0); - #else - // Run one instance of our "thread". thread number 0, it should just crunch it all - pargs = new powerline_arg; diff --git a/kismet-2007-01-R1-gcc43.patch b/kismet-2007-01-R1-gcc43.patch deleted file mode 100644 index dd94abc..0000000 --- a/kismet-2007-01-R1-gcc43.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- kismet-2007-10-R1/util.cc.orig 2008-02-22 16:08:42.004091798 +0100 -+++ kismet-2007-10-R1/util.cc 2008-02-22 16:08:55.065091287 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - // We need this to make uclibc happy since they don't even have rintf... - #ifndef rintf ---- kismet-2007-10-R1/ringbuf.h.orig 2008-02-22 16:09:40.238091139 +0100 -+++ kismet-2007-10-R1/ringbuf.h 2008-02-22 16:09:51.598092831 +0100 -@@ -18,6 +18,7 @@ - #include - #include - #include -+#include - - #include - #include ---- kismet-2007-10-R1/kismet_wrapper.cc.orig 2008-02-22 16:11:53.820091017 +0100 -+++ kismet-2007-10-R1/kismet_wrapper.cc 2008-02-22 16:12:04.434091322 +0100 -@@ -19,6 +19,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/kismet-2007-10-R1-printf.patch b/kismet-2007-10-R1-printf.patch deleted file mode 100644 index cb814cb..0000000 --- a/kismet-2007-10-R1-printf.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -up kismet-2007-10-R1/finitestate.cc.printf kismet-2007-10-R1/finitestate.cc ---- kismet-2007-10-R1/finitestate.cc.printf 2005-06-03 07:31:10.000000000 +0200 -+++ kismet-2007-10-R1/finitestate.cc 2007-10-08 09:16:00.000000000 +0200 -@@ -224,8 +224,9 @@ int BssTimestampAutomata::ProcessPacket( - - snprintf(atext, STATUS_MAX, "Out-of-sequence BSS timestamp on %s " - "- got %llx, expected %llx - this could indicate AP spoofing", -- in_info->bssid_mac.Mac2String().c_str(), in_info->timestamp, -- elem->bss_timestamp); -+ in_info->bssid_mac.Mac2String().c_str(), -+ static_cast(in_info->timestamp), -+ static_cast(elem->bss_timestamp)); - atracker->RaiseAlert(alertid, in_info->bssid_mac, 0, 0, 0, - in_info->channel, atext); - -diff -up kismet-2007-10-R1/gpsmap.cc.printf kismet-2007-10-R1/gpsmap.cc ---- kismet-2007-10-R1/gpsmap.cc.printf 2007-10-08 09:16:00.000000000 +0200 -+++ kismet-2007-10-R1/gpsmap.cc 2007-10-08 09:16:00.000000000 +0200 -@@ -1025,7 +1025,7 @@ int ProcessGPSFile(char *in_fname) { - - // Sanitize the data and build the map of points we don't look at - if (verbose) -- fprintf(stderr, "NOTICE: Sanitizing %d sample points...\n", -+ fprintf(stderr, "NOTICE: Sanitizing %zd sample points...\n", - file_points.size()); - SanitizeSamplePoints(file_points, &file_screen); - -@@ -2881,7 +2881,7 @@ int DrawLegendComposite(vectorsecond); - } - -- fprintf(stderr, "Plotting %d networks...\n", gpsnetvec.size()); -+ fprintf(stderr, "Plotting %zd networks...\n", gpsnetvec.size()); - - for (unsigned int x = 0; x < draw_feature_order.length(); x++) { - switch (draw_feature_order[x]) { -diff -up kismet-2007-10-R1/server_protocols.cc.printf kismet-2007-10-R1/server_protocols.cc ---- kismet-2007-10-R1/server_protocols.cc.printf 2007-03-27 14:44:20.000000000 +0200 -+++ kismet-2007-10-R1/server_protocols.cc 2007-10-08 09:16:00.000000000 +0200 -@@ -522,7 +522,7 @@ void Protocol_Network2Data(const wireles - snprintf(tmpstr, 128, "%d", net->dupeiv_packets); - data->ndvec.push_back(tmpstr); - -- snprintf(tmpstr, 128, "%lld", net->bss_timestamp); -+ snprintf(tmpstr, 128, "%lld", static_cast(net->bss_timestamp)); - data->ndvec.push_back(tmpstr); - - } -diff -up kismet-2007-10-R1/tcpclient.cc.printf kismet-2007-10-R1/tcpclient.cc -diff -up kismet-2007-10-R1/panelfront_display.cc.printf kismet-2007-10-R1/panelfront_display.cc ---- kismet-2007-10-R1/panelfront_display.cc.printf 2007-10-05 03:42:30.000000000 +0200 -+++ kismet-2007-10-R1/panelfront_display.cc 2007-10-08 09:16:00.000000000 +0200 -@@ -1711,7 +1711,8 @@ int PanelFront::DetailsPrinter(void *in_ - - // Added by Sven-Ola, may need le64_to_cpu()? Also added the bss_tsf - // to the kismet tcp protocol used between client and server -- snprintf(output, print_width, "BSS Time: %llx", dnet->bss_timestamp); -+ snprintf(output, print_width, "BSS Time: %llx", -+ static_cast(dnet->bss_timestamp)); - kwin->text.push_back(output); - - if (dnet->maxseenrate != 0) { diff --git a/kismet-2008-05-R1-const.patch b/kismet-2008-05-R1-const.patch new file mode 100644 index 0000000..c98b595 --- /dev/null +++ b/kismet-2008-05-R1-const.patch @@ -0,0 +1,627 @@ +2008-06-21 Enrico Scholz + + Added 'const' modifiers to lot of 'char *' declarations; I used + the widely spread + + | const char * ... + + layout as far as possible. But for the list-of-strings variables, + I applied the more consistent and easier to read + + | char const * const VAR[] + + format. + + + Function/method declarations were updated to work with these + constant char-arrays. + +diff -up kismet-2008-05-R1/packetracker.cc.~1~ kismet-2008-05-R1/packetracker.cc +--- kismet-2008-05-R1/packetracker.cc.~1~ 2007-10-06 23:09:03.000000000 +0200 ++++ kismet-2008-05-R1/packetracker.cc 2008-06-21 18:11:56.000000000 +0200 +@@ -1194,7 +1194,7 @@ void Packetracker::ProcessDataPacket(kis + } + + unsigned int ipdata_dirty = 0; +- char *means = NULL; ++ const char *means = NULL; + + if (info->proto.type == proto_dhcp_server && + (client->ipdata.atype < address_dhcp || +@@ -1294,7 +1294,7 @@ void Packetracker::ProcessDataPacket(kis + // Handle netstumbler packets + + if (alertracker->PotentialAlert(arefs[NETSTUMBLER_AREF]) > 0) { +- char *nsversion; ++ const char *nsversion; + + switch (info->proto.prototype_extra) { + case 22: +@@ -1320,8 +1320,8 @@ void Packetracker::ProcessDataPacket(kis + info->proto.type == proto_ttls || info->proto.type == proto_tls) { + // Handle EAP packets + +- char *eapcode; +- char *eaptype; ++ const char *eapcode; ++ const char *eaptype; + + switch (info->proto.prototype_extra) { + case EAP_CODE_REQUEST: +@@ -1373,7 +1373,7 @@ void Packetracker::ProcessDataPacket(kis + } else if (info->proto.type == proto_isakmp) { + // Handle ISAKMP traffic + +- char *isakmpcode; ++ const char *isakmpcode; + switch (info->proto.prototype_extra) { + case ISAKMP_EXCH_NONE: + isakmpcode = "NONE"; +@@ -2394,7 +2394,7 @@ int Packetracker::WriteXMLNetworks(strin + } + + if (net->ipdata.atype > address_factory) { +- char *addrtype; ++ const char *addrtype; + switch (net->ipdata.atype) { + case address_dhcp: + addrtype = "dhcp"; +@@ -2425,7 +2425,7 @@ int Packetracker::WriteXMLNetworks(strin + for (unsigned int cltr = 0; cltr < net->client_vec.size(); cltr++) { + wireless_client *cli = net->client_vec[cltr]; + +- char *clitype; ++ const char *clitype; + switch (cli->type) { + case client_fromds: + clitype = "fromds"; +@@ -2527,7 +2527,7 @@ int Packetracker::WriteXMLNetworks(strin + + + if (cli->ipdata.atype > address_factory) { +- char *addrtype; ++ const char *addrtype; + switch (cli->ipdata.atype) { + case address_dhcp: + addrtype = "dhcp"; +diff -up kismet-2008-05-R1/panelfront.cc.~1~ kismet-2008-05-R1/panelfront.cc +--- kismet-2008-05-R1/panelfront.cc.~1~ 2008-02-06 22:34:25.000000000 +0100 ++++ kismet-2008-05-R1/panelfront.cc 2008-06-21 18:17:43.000000000 +0200 +@@ -54,7 +54,7 @@ + + #if (defined(HAVE_LIBNCURSES) && defined(HAVE_LIBPANEL) && defined(BUILD_PANEL)) + +-char *KismetHelpText[] = { ++char const * const KismetHelpText[] = { + "KISMET PANELS INTERFACE", + "QUICK REFERENCE", + " Key Action", +@@ -138,7 +138,7 @@ char *KismetHelpText[] = { + + + // Narrow text +-char *KismetHelpTextNarrow[] = { ++char const * const KismetHelpTextNarrow[] = { + "KISMET PANELS INTERFACE", + "KISMET NETWORK PANEL", + "Key Action", +@@ -171,7 +171,7 @@ char *KismetHelpTextNarrow[] = { + }; + + +-char *KismetHelpDetails[] = { ++char const * const KismetHelpDetails[] = { + "NETWORK DETAILS", + "This panel lists in depth information about", + "the selected network or group, which may or", +@@ -188,7 +188,7 @@ char *KismetHelpDetails[] = { + }; + + +-char *KismetSortText[] = { ++char const * const KismetSortText[] = { + "Key Sort Key Sort", + " a Auto-fit (standard) c Channel", + " f First time seen F First time seen (descending)", +@@ -202,7 +202,7 @@ char *KismetSortText[] = { + }; + + +-char *KismetSortTextNarrow[] = { ++char const * const KismetSortTextNarrow[] = { + "Key Sort Key Sort", + " a Auto-fit c Channel", + " f First time F First time (d)", +@@ -215,7 +215,7 @@ char *KismetSortTextNarrow[] = { + NULL + }; + +-char *KismetClientSortText[] = { ++char const * const KismetClientSortText[] = { + "Key Sort Key Sort", + " a Auto-fit (standard) c Channel", + " f First time seen F First time seen (descending)", +@@ -227,7 +227,7 @@ char *KismetClientSortText[] = { + NULL + }; + +-char *KismetClientSortTextNarrow[] = { ++char const * const KismetClientSortTextNarrow[] = { + "Key Sort Key Sort", + " a Auto-fit c Channel", + " f First time F First time (d)", +@@ -239,7 +239,7 @@ char *KismetClientSortTextNarrow[] = { + NULL + }; + +-char *KismetHelpPower[] = { ++char const * const KismetHelpPower[] = { + "KISMET POWER", + "This panel lists the overall signal (S) and " + "noise (N) levels reported by the wireless card, if", +@@ -250,7 +250,7 @@ char *KismetHelpPower[] = { + }; + + +-char *KismetHelpRate[] = { ++char const * const KismetHelpRate[] = { + "KISMET PACKET RATE", + "This panel displays a moving graph of the rate at which", + "packets are seen. The graph covers the last 5 minutes.", +@@ -260,7 +260,7 @@ char *KismetHelpRate[] = { + }; + + +-char *KismetHelpGps[] = { ++char const * const KismetHelpGps[] = { + "KISMET NETWORK FOLLOW", + "This panel estimates the center of a network, the current", + "direction of travel, and the direction of the network center", +@@ -273,7 +273,7 @@ char *KismetHelpGps[] = { + }; + + +-char *KismetHelpStats[] = { ++char const * const KismetHelpStats[] = { + "KISMET NETWORK STATISTICS", + "This panel displays overall statistics about the wireless", + "networks seen, including how many are encrypted with WEP", +@@ -286,7 +286,7 @@ char *KismetHelpStats[] = { + }; + + +-char *KismetHelpDump[] = { ++char const * const KismetHelpDump[] = { + "KISMET STRING DUMP", + "This panel displays printable strings from uencrypted data", + "packets. This is basially equivalent to the 'strings' command", +@@ -302,7 +302,7 @@ char *KismetHelpDump[] = { + }; + + +-char *KismetHelpPack[] = { ++char const * const KismetHelpPack[] = { + "KISMET PACKET DUMP", + "This panel displays information about the packet types seen.", + "It is divided into 2 segments - The upper quarter displays a", +@@ -348,7 +348,7 @@ char *KismetHelpPack[] = { + NULL + }; + +-char *KismetHelpAlert[] = { ++char const * const KismetHelpAlert[] = { + "KISMET ALERTS", + "This panel tracks alert conditions, such as NetStumbler clients", + "or DOS attacks.", +@@ -358,7 +358,7 @@ char *KismetHelpAlert[] = { + NULL + }; + +-char *KismetClientHelpText[] = { ++char const * const KismetClientHelpText[] = { + "KISMET CLIENT LIST", + "QUICK REFERENCE", + " Key Action", +@@ -386,7 +386,7 @@ char *KismetClientHelpText[] = { + NULL, + }; + +-char *KismetClientHelpDetails[] = { ++char const * const KismetClientHelpDetails[] = { + "CLIENT DETAILS", + "This panel lists in depth information about", + "the selected client, which may or may not be", +@@ -400,7 +400,7 @@ char *KismetClientHelpDetails[] = { + NULL + }; + +-char *KismetHelpServer[] = { ++char const * const KismetHelpServer[] = { + "KISMET SERVERS", + " Key Action", + " Up Scroll list up", +@@ -423,7 +423,7 @@ char *KismetHelpServer[] = { + NULL + }; + +-char *KismetIntroText[] = { ++char const * const KismetIntroText[] = { + "", + "Welcome to the Kismet panels frontend.", + "Context help is available for all displays, press 'H' at any time", +@@ -1187,7 +1187,7 @@ PanelFront::kis_window *PanelFront::Spaw + } + + // Spawn a text helpbox with the included help stuff +-void PanelFront::SpawnHelp(char **in_helptext) { ++void PanelFront::SpawnHelp(char const * const *in_helptext) { + kis_window *kwin = new kis_window; + + // Fill in the window a bit +diff -up kismet-2008-05-R1/server_protocols.cc.~1~ kismet-2008-05-R1/server_protocols.cc +--- kismet-2008-05-R1/server_protocols.cc.~1~ 2008-03-16 18:59:00.000000000 +0100 ++++ kismet-2008-05-R1/server_protocols.cc 2008-06-21 18:13:30.000000000 +0200 +@@ -23,23 +23,23 @@ + #include "server_protocols.h" + #include "server_globals.h" + +-char *INFO_fields_text[] = { ++char const * const INFO_fields_text[] = { + "networks", "packets", "crypt", "weak", + "noise", "dropped", "rate", "signal", + NULL + }; + +-char *STATUS_fields_text[] = { ++char const * const STATUS_fields_text[] = { + "text", + NULL + }; + +-char *ALERT_fields_text[] = { ++char const * const ALERT_fields_text[] = { + "sec", "usec", "header", "bssid", "source", "dest", "other", "channel", "text", + NULL + }; + +-char *PACKET_fields_text[] = { ++char const * const PACKET_fields_text[] = { + "type", "subtype", "timesec", "encrypted", + "weak", "beaconrate", "sourcemac", "destmac", + "bssid", "ssid", "prototype", "sourceip", +@@ -48,52 +48,52 @@ char *PACKET_fields_text[] = { + NULL + }; + +-char *STRING_fields_text[] = { ++char const * const STRING_fields_text[] = { + "bssid", "sourcemac", "text", + NULL + }; + +-char *CISCO_fields_text[] = { ++char const * const CISCO_fields_text[] = { + "placeholder", + NULL + }; + +-char *KISMET_fields_text[] = { ++char const * const KISMET_fields_text[] = { + "version", "starttime", "servername", "timestamp", "channelhop", "newversion", + NULL + }; + +-char *PROTOCOLS_fields_text[] = { ++char const * const PROTOCOLS_fields_text[] = { + "protocols", + NULL + }; + +-char *CAPABILITY_fields_text[] = { ++char const * const CAPABILITY_fields_text[] = { + "capabilities", + NULL + }; + +-char *TIME_fields_text[] = { ++char const * const TIME_fields_text[] = { + "timesec", + NULL + }; + +-char *TERMINATE_fields_text[] = { ++char const * const TERMINATE_fields_text[] = { + "text", + NULL + }; + +-char *GPS_fields_text[] = { ++char const * const GPS_fields_text[] = { + "lat", "lon", "alt", "spd", "heading", "fix", + NULL + }; + +-char *REMOVE_fields_text[] = { ++char const * const REMOVE_fields_text[] = { + "bssid", + NULL + }; + +-char *NETWORK_fields_text[] = { ++char const * const NETWORK_fields_text[] = { + "bssid", "type", "ssid", "beaconinfo", + "llcpackets", "datapackets", "cryptpackets", + "weakpackets", "channel", "wep", "firsttime", +@@ -114,7 +114,7 @@ char *NETWORK_fields_text[] = { + NULL + }; + +-char *CLIENT_fields_text[] = { ++char const * const CLIENT_fields_text[] = { + "bssid", "mac", "type", "firsttime", "lasttime", + "manufkey", "manufscore", + "datapackets", "cryptpackets", "weakpackets", +@@ -131,22 +131,22 @@ char *CLIENT_fields_text[] = { + NULL + }; + +-char *ERROR_fields_text[] = { ++char const * const ERROR_fields_text[] = { + "text", + NULL + }; + +-char *ACK_fields_text[] = { ++char const * const ACK_fields_text[] = { + "cmdnum", + NULL + }; + +-char *WEPKEY_fields_text[] = { ++char const * const WEPKEY_fields_text[] = { + "origin", "bssid", "key", "encrypted", "failed", + NULL + }; + +-char *CARD_fields_text[] = { ++char const * const CARD_fields_text[] = { + "interface", "type", "username", "channel", "id", "packets", "hopping", + NULL + }; +diff -up kismet-2008-05-R1/tcpserver.cc.~1~ kismet-2008-05-R1/tcpserver.cc +--- kismet-2008-05-R1/tcpserver.cc.~1~ 2007-01-26 17:26:57.000000000 +0100 ++++ kismet-2008-05-R1/tcpserver.cc 2008-06-21 18:15:29.000000000 +0200 +@@ -567,7 +567,7 @@ int TcpServer::SendMainProtocols(int in_ + return SendToClient(in_fd, in_ref, (void *) &protocol_map); + } + +-int TcpServer::RegisterProtocol(string in_header, int in_required, char **in_fields, ++int TcpServer::RegisterProtocol(string in_header, int in_required, char const * const *in_fields, + int (*in_printer)(PROTO_PARMS), + void (*in_enable)(int)) { + // First, see if we're already registered and return a -1 if we are. You can't +diff -up kismet-2008-05-R1/gpsmap.cc.~1~ kismet-2008-05-R1/gpsmap.cc +--- kismet-2008-05-R1/gpsmap.cc.~1~ 2008-06-21 18:23:33.000000000 +0200 ++++ kismet-2008-05-R1/gpsmap.cc 2008-06-21 18:29:56.000000000 +0200 +@@ -162,7 +162,7 @@ const uint8_t track_decay = 0x1F; + const unsigned int horiz_throttle = 75000; + + // Image colors +-const char *netcolors[] = { ++char const * const netcolors[] = { + "#000000", + "#FF0000", "#FF0072", "#FF00E5", "#D400FF", + "#5D00FF", "#0087FF", "#00F2FF", "#00FF94", +@@ -174,7 +174,7 @@ const char *netcolors[] = { + + // Channel colors + /* +-char *channelcolors[] = { ++char const * const channelcolors[] = { + "#FF0000", "#FF8000", "#FFFF00", + "#80FF00", "#00FF00", "#00FF80", + "#00FFFF", "#0080FF", "#0000FF", +@@ -182,7 +182,7 @@ char *channelcolors[] = { + "#808080", "#CCCCCC" + }; + */ +-char *channelcolors[] = { ++char const * const channelcolors[] = { + "#FF0000", "#FF6000", "#A08000", + "#80A000", "#60FF00", "#00FF00", + "#00FF60", "#00A080", "#0080A0", +@@ -191,7 +191,7 @@ char *channelcolors[] = { + int channelcolor_max = 14; + + // Origional +-char *powercolors_Orig[] = { ++char const * const powercolors_Orig[] = { + "#FF0000", "#FFD500", "#FFCC00", + "#F2FF00", "#7BFF00", "#00FFB6", + "#00FFFF", "#005DFF", "#A100FF", +@@ -199,7 +199,7 @@ char *powercolors_Orig[] = { + }; + const int power_steps_Orig = 10; + // Blue powercolors +-char *powercolors_Blue[] = { ++char const * const powercolors_Blue[] = { + "#A0A0FF", + "#9B9BFA", + "#9696F5", +@@ -236,7 +236,7 @@ char *powercolors_Blue[] = { + const int power_steps_Blue = 32; + + // Math progression +-char *powercolors_Math[] = { ++char const * const powercolors_Math[] = { + "#FF0000", "#FF8000", "#FFFF00", + "#80FF00", "#00FF00", "#00FF80", + "#00FFFF", "#0080FF", "#0000FF", +@@ -244,7 +244,7 @@ char *powercolors_Math[] = { + }; + const int power_steps_Math = 12; + // Weather Radar +-char *powercolors_Radar[] = { ++char const * const powercolors_Radar[] = { + "#50E350", "#39C339", "#208420", + "#145A14", "#C8C832", "#DC961E", + "#811610", "#B31A17", "#E61E1E" +@@ -256,7 +256,7 @@ const int power_max = 255; + int powercolor_index = 0; + + // Label gravity +-char *label_gravity_list[] = { ++char const * const label_gravity_list[] = { + "northwest", "north", "northeast", + "west", "center", "east", + "southwest", "south", "southeast" +@@ -411,7 +411,7 @@ int mapsource = -1; + int power_resolution = 5; + // Interpolation colors + // strength colors +-char **power_colors = NULL; ++char const * const *power_colors = NULL; + int power_steps = 0; + // Center resolution (size of circle) + int center_resolution = 2; +diff -up kismet-2008-05-R1/kismet_server.cc.~1~ kismet-2008-05-R1/kismet_server.cc +--- kismet-2008-05-R1/kismet_server.cc.~1~ 2008-06-21 18:23:33.000000000 +0200 ++++ kismet-2008-05-R1/kismet_server.cc 2008-06-21 18:25:09.000000000 +0200 +@@ -230,14 +230,14 @@ int retain_monitor; + int netcryptdetect = 0; + + // Shutdown/restore networkmanager (if we can) +-int networkmanager_control(char *cmd) { ++int networkmanager_control(const char *cmd) { + #ifdef HAVE_DBUS + DBusMessage* msg; + DBusConnection* conn; + DBusError err; + +- char *name = "org.freedesktop.NetworkManager"; +- char *path = "/org/freedesktop/NetworkManager"; ++ const char *name = "org.freedesktop.NetworkManager"; ++ const char *path = "/org/freedesktop/NetworkManager"; + + // initialise the error value + dbus_error_init(&err); +diff -up kismet-2008-05-R1/panelfront.h.~1~ kismet-2008-05-R1/panelfront.h +--- kismet-2008-05-R1/panelfront.h.~1~ 2008-06-21 18:23:33.000000000 +0200 ++++ kismet-2008-05-R1/panelfront.h 2008-06-21 18:27:48.000000000 +0200 +@@ -58,28 +58,28 @@ + #define ACS_VLINE '|' + #endif + +-extern char *KismetHelpText[]; +-extern char *KismetHelpTextNarrow[]; +-extern char *KismetHelpDetails[]; +-extern char *KismetSortText[]; +-extern char *KismetSortTextNarrow[]; ++extern char const * const KismetHelpText[]; ++extern char const * const KismetHelpTextNarrow[]; ++extern char const * const KismetHelpDetails[]; ++extern char const * const KismetSortText[]; ++extern char const * const KismetSortTextNarrow[]; + #define SORT_SIZE 10 +-extern char *KismetHelpPower[]; +-extern char *KismetHelpRate[]; +-extern char *KismetHelpGps[]; +-extern char *KismetHelpStats[]; +-extern char *KismetHelpDump[]; +-extern char *KismetHelpPack[]; +-extern char *KismetHelpAlert[]; +-extern char *KismetHelpServer[]; +- +-extern char *KismetClientHelpText[]; +-extern char *KismetClientHelpDetails[]; +-extern char *KismetClientSortText[]; +-extern char *KismetClientSortTextNarrow[]; ++extern char const * const KismetHelpPower[]; ++extern char const * const KismetHelpRate[]; ++extern char const * const KismetHelpGps[]; ++extern char const * const KismetHelpStats[]; ++extern char const * const KismetHelpDump[]; ++extern char const * const KismetHelpPack[]; ++extern char const * const KismetHelpAlert[]; ++extern char const * const KismetHelpServer[]; ++ ++extern char const * const KismetClientHelpText[]; ++extern char const * const KismetClientHelpDetails[]; ++extern char const * const KismetClientSortText[]; ++extern char const * const KismetClientSortTextNarrow[]; + #define CLIENT_SORT_SIZE 8 + +-extern char *KismetIntroText[]; ++extern char const * const KismetIntroText[]; + + // These are in the kismet_curses.cc main code + extern int sound; +@@ -318,7 +318,7 @@ protected: + key_handler in_input, int in_x = -1, int in_y = -1); + + // Spawn a help popup +- void SpawnHelp(char **in_helptext); ++ void SpawnHelp(char const * const in_helptext[]); + + // Kill a window + void DestroyWindow(kis_window *in_window); +diff -up kismet-2008-05-R1/server_protocols.h.~1~ kismet-2008-05-R1/server_protocols.h +--- kismet-2008-05-R1/server_protocols.h.~1~ 2008-06-21 18:23:33.000000000 +0200 ++++ kismet-2008-05-R1/server_protocols.h 2008-06-21 18:24:28.000000000 +0200 +@@ -139,25 +139,25 @@ enum CARD_fields { + }; + + // Builtin client/server field contents +-extern char *KISMET_fields_text[]; +-extern char *CAPABILITY_fields_text[]; +-extern char *PROTOCOLS_fields_text[]; +-extern char *ERROR_fields_text[]; +-extern char *NETWORK_fields_text[]; +-extern char *CLIENT_fields_text[]; +-extern char *GPS_fields_text[]; +-extern char *TIME_fields_text[]; +-extern char *INFO_fields_text[]; +-extern char *REMOVE_fields_text[]; +-extern char *STATUS_fields_text[]; +-extern char *ALERT_fields_text[]; +-extern char *ACK_fields_text[]; +-extern char *PACKET_fields_text[]; +-extern char *STRING_fields_text[]; +-extern char *TERMINATE_fields_text[]; +-extern char *CISCO_fields_text[]; +-extern char *WEPKEY_fields_text[]; +-extern char *CARD_fields_text[]; ++extern char const * const KISMET_fields_text[]; ++extern char const * const CAPABILITY_fields_text[]; ++extern char const * const PROTOCOLS_fields_text[]; ++extern char const * const ERROR_fields_text[]; ++extern char const * const NETWORK_fields_text[]; ++extern char const * const CLIENT_fields_text[]; ++extern char const * const GPS_fields_text[]; ++extern char const * const TIME_fields_text[]; ++extern char const * const INFO_fields_text[]; ++extern char const * const REMOVE_fields_text[]; ++extern char const * const STATUS_fields_text[]; ++extern char const * const ALERT_fields_text[]; ++extern char const * const ACK_fields_text[]; ++extern char const * const PACKET_fields_text[]; ++extern char const * const STRING_fields_text[]; ++extern char const * const TERMINATE_fields_text[]; ++extern char const * const CISCO_fields_text[]; ++extern char const * const WEPKEY_fields_text[]; ++extern char const * const CARD_fields_text[]; + + // Client/server protocol data structures. These get passed as void *'s to each of the + // protocol functions. +diff -up kismet-2008-05-R1/tcpserver.h.~1~ kismet-2008-05-R1/tcpserver.h +--- kismet-2008-05-R1/tcpserver.h.~1~ 2008-06-21 18:23:33.000000000 +0200 ++++ kismet-2008-05-R1/tcpserver.h 2008-06-21 18:26:04.000000000 +0200 +@@ -128,7 +128,7 @@ public: + // of protocol. (ie, send all networks when the client enables the *NETWORK + // protocol) + // It returns the index number of the sentence added. +- int RegisterProtocol(string in_header, int in_required, char **in_fields, ++ int RegisterProtocol(string in_header, int in_required, char const * const in_fields[], + int (*in_printer)(PROTO_PARMS), + void (*in_enable)(int)); + int FetchProtocolRef(string in_header); diff --git a/kismet-2008-05-R1-fmt.patch b/kismet-2008-05-R1-fmt.patch new file mode 100644 index 0000000..501f687 --- /dev/null +++ b/kismet-2008-05-R1-fmt.patch @@ -0,0 +1,33 @@ +2008-06-21 Enrico Scholz + + XML_Size is defined by complicated rules resulting into + uint64_t, unsigned long or unsigned long long types. This + conflicts with printf() modifiers so that this patch casts + them to 'unsigned long' and uses %lu. + + +diff -up kismet-2008-05-R1/expat.cc.~1~ kismet-2008-05-R1/expat.cc +--- kismet-2008-05-R1/expat.cc.~1~ 2007-09-27 06:05:15.000000000 +0200 ++++ kismet-2008-05-R1/expat.cc 2008-06-21 18:36:21.000000000 +0200 +@@ -817,8 +817,8 @@ vector XMLFetchNetwo + #endif + + if (! XML_Parse(p, Buff, len, done)) { +- fprintf(stderr, "Parse error at line %d: %s\n", +- XML_GetCurrentLineNumber(p), ++ fprintf(stderr, "Parse error at line %lu: %s\n", ++ (unsigned long)XML_GetCurrentLineNumber(p), + XML_ErrorString(XML_GetErrorCode(p))); + return netvec; + } +@@ -1061,8 +1061,8 @@ vector XMLFetchGpsList(FILE + #endif + + if (! XML_Parse(p, Buff, len, done)) { +- fprintf(stderr, "WARNING: Parse error at line %d: %s\n", +- XML_GetCurrentLineNumber(p), ++ fprintf(stderr, "WARNING: Parse error at line %lu: %s\n", ++ (unsigned long)XML_GetCurrentLineNumber(p), + XML_ErrorString(XML_GetErrorCode(p))); + return ptvec; + } diff --git a/kismet-2008-05-R1-typedef.patch b/kismet-2008-05-R1-typedef.patch new file mode 100644 index 0000000..dff25e9 --- /dev/null +++ b/kismet-2008-05-R1-typedef.patch @@ -0,0 +1,327 @@ +2008-06-21 Enrico Scholz + + Sources contained lot of bogus 'typedef' resulting into + + | warning: 'typedef' was ignored in this declaration + + warnings. + +diff -up kismet-2008-05-R1/macaddr.h.~1~ kismet-2008-05-R1/macaddr.h +--- kismet-2008-05-R1/macaddr.h.~1~ 2007-07-24 04:02:37.000000000 +0200 ++++ kismet-2008-05-R1/macaddr.h 2008-06-21 17:56:36.000000000 +0200 +@@ -46,7 +46,7 @@ + #define MAC_STR_LEN ((MAC_LEN * 2) + 6) + + // A packet MAC address +-typedef struct mac_addr { ++struct mac_addr { + uint64_t longmac; + uint64_t longmask; + int error; +@@ -277,12 +277,12 @@ typedef struct mac_addr { + template + class macmap { + protected: +- typedef struct mask_vec_content { ++ struct mask_vec_content { + mac_addr mac; + T value; + }; + +- typedef struct mask_vec_offsets { ++ struct mask_vec_offsets { + unsigned int first; + unsigned int last; + }; +diff -up kismet-2008-05-R1/packet.h.~1~ kismet-2008-05-R1/packet.h +--- kismet-2008-05-R1/packet.h.~1~ 2007-09-24 07:30:19.000000000 +0200 ++++ kismet-2008-05-R1/packet.h 2008-06-21 17:57:01.000000000 +0200 +@@ -54,7 +54,7 @@ + #define MAC_STR_LEN ((MAC_LEN * 2) + 6) + + // Parmeters to the packet info +-typedef struct packet_parm { ++struct packet_parm { + int fuzzy_crypt; + int fuzzy_decode; + }; +@@ -295,7 +295,7 @@ typedef struct { + } cdp_proto_element; + + // Info about a protocol +-typedef struct proto_info { ++struct proto_info { + protocol_info_type type; + + uint8_t source_ip[4]; +diff -up kismet-2008-05-R1/tracktypes.h.~1~ kismet-2008-05-R1/tracktypes.h +--- kismet-2008-05-R1/tracktypes.h.~1~ 2007-10-06 23:09:03.000000000 +0200 ++++ kismet-2008-05-R1/tracktypes.h 2008-06-21 17:57:29.000000000 +0200 +@@ -27,7 +27,7 @@ + #include "packet.h" + + #ifndef display_network +-typedef struct display_network; ++struct display_network; + #endif + + // Forward definition +@@ -90,7 +90,7 @@ enum client_type { + }; + + // Client info +-typedef struct wireless_client { ++struct wireless_client { + wireless_client() { + type = client_unknown; + +@@ -266,7 +266,7 @@ typedef struct wireless_client { + }; + + // A network +-typedef struct wireless_network { ++struct wireless_network { + wireless_network() { + type = network_data; + +diff -up kismet-2008-05-R1/util.h.~1~ kismet-2008-05-R1/util.h +--- kismet-2008-05-R1/util.h.~1~ 2006-08-28 22:37:29.000000000 +0200 ++++ kismet-2008-05-R1/util.h 2008-06-21 17:58:01.000000000 +0200 +@@ -54,7 +54,7 @@ int Hex2UChar(unsigned char *in_hex, uns + vector StrTokenize(string in_str, string in_split, int return_partial = 1); + + // 'smart' tokenizeing with start/end positions +-typedef struct smart_word_token { ++struct smart_word_token { + string word; + size_t begin; + size_t end; +diff -up kismet-2008-05-R1/alertracker.h.~1~ kismet-2008-05-R1/alertracker.h +--- kismet-2008-05-R1/alertracker.h.~1~ 2005-05-26 20:33:30.000000000 +0200 ++++ kismet-2008-05-R1/alertracker.h 2008-06-21 18:02:33.000000000 +0200 +@@ -43,7 +43,7 @@ enum alert_time_unit { + class Alertracker { + public: + // A registered alert type +- typedef struct alert_rec { ++ struct alert_rec { + int ref_index; + string header; + +diff -up kismet-2008-05-R1/packetstream.h.~1~ kismet-2008-05-R1/packetstream.h +--- kismet-2008-05-R1/packetstream.h.~1~ 2006-04-26 05:52:04.000000000 +0200 ++++ kismet-2008-05-R1/packetstream.h 2008-06-21 18:01:33.000000000 +0200 +@@ -37,18 +37,18 @@ + + #define STREAM_COMMAND_FLUSH -1 + +-typedef struct stream_frame_header { ++struct stream_frame_header { + uint32_t frame_sentinel; + uint8_t frame_type; + uint32_t frame_len; + } __attribute__((__packed__)); + +-typedef struct stream_version_packet { ++struct stream_version_packet { + uint16_t drone_version; + uint8_t gps_enabled; + }; + +-typedef struct stream_packet_header { ++struct stream_packet_header { + uint32_t header_len; + uint16_t drone_version; + uint32_t len; +diff -up kismet-2008-05-R1/pcapsource.h.~1~ kismet-2008-05-R1/pcapsource.h +--- kismet-2008-05-R1/pcapsource.h.~1~ 2008-05-19 11:51:54.000000000 +0200 ++++ kismet-2008-05-R1/pcapsource.h 2008-06-21 18:01:47.000000000 +0200 +@@ -298,7 +298,7 @@ public: + + #ifdef SYS_LINUX + // What we need to track on a linux interface to restore the settings +-typedef struct linux_ifparm { ++struct linux_ifparm { + int flags; + char essid[MAX_SSID_LEN + 1]; + int channel; +diff -up kismet-2008-05-R1/server_protocols.h.~1~ kismet-2008-05-R1/server_protocols.h +--- kismet-2008-05-R1/server_protocols.h.~1~ 2007-02-08 20:17:31.000000000 +0100 ++++ kismet-2008-05-R1/server_protocols.h 2008-06-21 18:02:18.000000000 +0200 +@@ -165,7 +165,7 @@ extern char *CARD_fields_text[]; + // same order as the field names. For shorter ones, the code is a lot more maintainable + // to have named vars, for longer ones it just makes sense to use a big ordered vector + +-typedef struct KISMET_data { ++struct KISMET_data { + string version; + string starttime; + string servername; +@@ -173,31 +173,31 @@ typedef struct KISMET_data { + string newversion; + }; + +-typedef struct GPS_data { ++struct GPS_data { + string lat, lon, alt, spd, heading, mode; + }; + +-typedef struct INFO_data { ++struct INFO_data { + string networks, packets, crypt, weak, noise, dropped, rate, signal; + }; + +-typedef struct NETWORK_data { ++struct NETWORK_data { + vector ndvec; + }; + +-typedef struct CLIENT_data { ++struct CLIENT_data { + vector cdvec; + }; + +-typedef struct ALERT_data { ++struct ALERT_data { + string header, sec, usec, bssid, source, dest, other, channel, text; + }; + +-typedef struct PACKET_data { ++struct PACKET_data { + vector pdvec; + }; + +-typedef struct STRING_data { ++struct STRING_data { + string bssid, sourcemac, text; + }; + +diff -up kismet-2008-05-R1/tcpserver.h.~1~ kismet-2008-05-R1/tcpserver.h +--- kismet-2008-05-R1/tcpserver.h.~1~ 2007-01-26 17:26:57.000000000 +0100 ++++ kismet-2008-05-R1/tcpserver.h 2008-06-21 18:02:42.000000000 +0200 +@@ -56,7 +56,7 @@ struct client_command { + string cmd; + }; + +-typedef struct server_protocol { ++struct server_protocol { + int ref_index; + string header; + int required; +diff -up kismet-2008-05-R1/timetracker.h.~1~ kismet-2008-05-R1/timetracker.h +--- kismet-2008-05-R1/timetracker.h.~1~ 2003-04-03 17:33:38.000000000 +0200 ++++ kismet-2008-05-R1/timetracker.h 2008-06-21 18:01:10.000000000 +0200 +@@ -31,7 +31,7 @@ + + class Timetracker { + public: +- typedef struct timer_event { ++ struct timer_event { + int timer_id; + + // Time it was scheduled +diff -up kismet-2008-05-R1/frontend.h.~1~ kismet-2008-05-R1/frontend.h +--- kismet-2008-05-R1/frontend.h.~1~ 2008-03-02 17:29:21.000000000 +0100 ++++ kismet-2008-05-R1/frontend.h 2008-06-21 18:05:47.000000000 +0200 +@@ -56,7 +56,7 @@ enum group_type { + }; + + // What do we actually display +-typedef struct display_network { ++struct display_network { + // Are we a group or just a single network? + group_type type; + // If we're a group, this will hold multiple networks +diff -up kismet-2008-05-R1/gpsmap.cc.~1~ kismet-2008-05-R1/gpsmap.cc +--- kismet-2008-05-R1/gpsmap.cc.~1~ 2008-06-21 18:04:00.000000000 +0200 ++++ kismet-2008-05-R1/gpsmap.cc 2008-06-21 18:07:09.000000000 +0200 +@@ -297,7 +297,7 @@ bool hullPoint::operator() (const hullPo + return a.angle < b.angle; + } + +-typedef struct gps_network { ++struct gps_network { + + gps_network() { + filtered = 0; +@@ -2154,7 +2154,7 @@ void DrawNetBoundRects(vector window_list; + + // Server context records for multiple servers +- typedef struct server_context { ++ struct server_context { + server_context() { + client = NULL; + quality = power = noise = 0; +@@ -241,7 +241,7 @@ protected: + }; + + // Context-aware cardinfo +- typedef struct cardinfo_context { ++ struct cardinfo_context { + server_context *context; + TcpClient::card_info *cardinfo; + }; +diff -up kismet-2008-05-R1/tcpclient.h.~1~ kismet-2008-05-R1/tcpclient.h +--- kismet-2008-05-R1/tcpclient.h.~1~ 2004-06-13 22:36:33.000000000 +0200 ++++ kismet-2008-05-R1/tcpclient.h 2008-06-21 18:05:30.000000000 +0200 +@@ -62,7 +62,7 @@ class TcpClient; + + class TcpClient { + public: +- typedef struct alert_info { ++ struct alert_info { + timeval alert_ts; + string alert_text; + }; +@@ -78,7 +78,7 @@ public: + } + }; + +- typedef struct string_info { ++ struct string_info { + mac_addr bssid; + mac_addr source; + timeval string_ts; +@@ -96,7 +96,7 @@ public: + } + }; + +- typedef struct card_info { ++ struct card_info { + string interface; + string type; + string username; diff --git a/kismet-2008-05-R1-typo.patch b/kismet-2008-05-R1-typo.patch new file mode 100644 index 0000000..88457e1 --- /dev/null +++ b/kismet-2008-05-R1-typo.patch @@ -0,0 +1,17 @@ +2008-06-21 Enrico Scholz + + Fixes typo... + + +diff -up kismet-2008-05-R1/packetracker.cc.~1~ kismet-2008-05-R1/packetracker.cc +--- kismet-2008-05-R1/packetracker.cc.~1~ 2007-10-06 23:09:03.000000000 +0200 ++++ kismet-2008-05-R1/packetracker.cc 2008-06-21 18:11:56.000000000 +0200 +@@ -1054,7 +1054,7 @@ void Packetracker::ProcessDataPacket(kis + + if (info->gps_lon < client->min_lon || client->min_lon == -180) + client->min_lon = info->gps_lon; +- if (info->gps_lon > client->max_lon == 180) ++ if (info->gps_lon > client->max_lon || client->max_lon == 180) + client->max_lon = info->gps_lon; + + if (info->gps_alt < client->min_alt || client->min_alt == 0) diff --git a/kismet.spec b/kismet.spec index 1d56b3a..b82fa68 100644 --- a/kismet.spec +++ b/kismet.spec @@ -1,4 +1,4 @@ -%global _version 2007-10-R1 +%global _version 2008-05-R1 ## Fedora Extras specific customization below... %bcond_without fedora @@ -18,7 +18,7 @@ Summary: WLAN detector, sniffer and IDS Name: kismet Version: %_rpmversion -Release: %release_func 3 +Release: %release_func 1 License: GPL Group: Applications/Internet URL: http://www.kismetwireless.net/ @@ -28,9 +28,10 @@ Source10: tmpwatch.kismet Source11: sysconfig.kismet Patch7: kismet-2006-04-R1-ssize.patch Patch8: kismet-2007-01-R1-setgroups.patch -Patch9: kismet-2007-10-R1-printf.patch -Patch10: kismet-2007-01-R1-cast.patch -Patch11: kismet-2007-01-R1-gcc43.patch +Patch13: kismet-2008-05-R1-typedef.patch +Patch14: kismet-2008-05-R1-typo.patch +Patch15: kismet-2008-05-R1-const.patch +Patch16: kismet-2008-05-R1-fmt.patch BuildRoot: %_tmppath/%name-%version-%release-root BuildRequires: expat-devel ncurses-devel diffutils BuildRequires: gmp-devel wget libpcap-devel @@ -79,9 +80,10 @@ but introduce dependencies which are not needed for kismet to work. %setup -q -n %name-%_version %patch7 -p1 -b .ssize %patch8 -p1 -b .setgroups -%patch9 -p1 -b .printf -%patch10 -p1 -b .cast -%patch11 -p1 -b .gcc43 +#patch12 -p1 -b .imagemagick +%patch13 -p1 -b .typedef +%patch14 -p1 -b .typo +%patch15 -p1 -b .const sed -e 's!/var/log/kismet!%logdir!g' %SOURCE10 >tmpwatch.kismet touch --reference=%SOURCE10 tmpwatch.kismet || : # keep timestamp @@ -157,6 +159,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jun 21 2008 Enrico Scholz - 0.0.2008.05.R1-1 +- updated to 2008-05-R1 +- removed some patches and added new ones + * Fri Feb 22 2008 Enrico Scholz - 0.0.2007.10.R1-3 - fixed build with gcc43 (#434084, thx to Erik van Pienbroek) diff --git a/lastver b/lastver index 72f269e..65cb91c 100644 --- a/lastver +++ b/lastver @@ -1 +1 @@ -2007-10-R1 +2008-05-R1 diff --git a/sources b/sources index 22d5de1..073ea89 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -2100c667e69db0cde35fa2d06c8516e2 kismet-2007-10-R1.tar.gz -d8752e46fa04fb634fd86f289bdb2e14 kismet-2007-10-R1.tar.gz.asc +6ee365d36354b4dee4945e67f8149294 kismet-2008-05-R1.tar.gz +6976640def18c452c3b27282577a9ae9 kismet-2008-05-R1.tar.gz.asc