diff --git a/network/kismet/Makefile b/network/kismet/Makefile new file mode 100644 index 0000000..30107a4 --- /dev/null +++ b/network/kismet/Makefile @@ -0,0 +1,76 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=kismet +PKG_VERSION:=master +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://www.kismetwireless.net/git/kismet.git +PKG_SOURCE_VERSION:=HEAD +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz + +include $(INCLUDE_DIR)/package.mk + +PKG_USE_MIPS16:=0 + +HOST_BUILD_DEPENDS:=protobuf/host + +define Package/kismet + SECTION:=net + CATEGORY:=Network + TITLE:=Kismet + URL:=https://www.kismetwireless.net/ + DEPENDS:=+libpthread +libpcap +libpcre +libmicrohttpd +libnl +libcap +libstdcpp +libncurses +libsqlite3 +zlib +protobuf +libprotobuf-c +endef + +define Package/kismet/description + Kismet wireless capture and IDS + Latest web-ui based Kismet + Linux Wi-Fi and Bluetooth capture tools +endef + +define Build/Configure + $(call Build/Configure/Default,--with-linux-headers=$(LINUX_DIR)) +endef + +CONFIGURE_ARGS += \ + --sysconfdir=/etc/kismet \ + --bindir=/usr/bin \ + --disable-python-tools \ + --with-protoc=$(STAGING_DIR_HOST)/bin/protoc + # We should be using protoc-c from the host binaries here, but the openwrt + # protoc-c package doesn't build a host tool + # --with-protoc-c=$(STAGING_DIR_HOST)/bin/protoc-c + +# Override libs to force lpthread because we don't detect it properly on openwrt +CONFIGURE_VARS += \ + CXXFLAGS="$$$$CXXFLAGS" \ + LIBS="-lm -lpthread" + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + LD="$(TARGET_CXX)" \ + all +endef + +define Package/kismet-2018-tetra/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/kismet_cap_pcapfile $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/capture_linux_wifi/kismet_cap_linux_wifi $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/capture_linux_bluetooth/kismet_cap_linux_bluetooth $(1)/usr/bin/ + + $(INSTALL_DIR) $(1)/etc/kismet/ + $(INSTALL_CONF) ./files/kismet_site.conf $(1)/etc/kismet/ + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet.conf $(1)/etc/kismet + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_alerts.conf $(1)/etc/kismet + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_httpd.conf $(1)/etc/kismet + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_logging.conf $(1)/etc/kismet + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_memory.conf $(1)/etc/kismet + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_storage.conf $(1)/etc/kismet + $(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/kismet_uav.conf $(1)/etc/kismet + cp -Rv $(PKG_BUILD_DIR)/http_data $(1)/etc/kismet/ +endef + +$(eval $(call BuildPackage,kismet)) diff --git a/network/kismet/files/kismet_site.conf b/network/kismet/files/kismet_site.conf new file mode 100644 index 0000000..8c53853 --- /dev/null +++ b/network/kismet/files/kismet_site.conf @@ -0,0 +1,16 @@ +# Insecure defaults for tetra; before making it a proper module +# we should integrate with the tetra ui +httpd_username=kismet +httpd_password=kismet + +httpd_home=/etc/kismet/http_data + +# Save memory on Tetra +keep_location_cloud_history=false +keep_datasource_signal_history=false + +packet_dedup_size=512 + +packet_backlog_warning=512 +packet_backlog_limit=1024 + diff --git a/network/kismet/src b/network/kismet/src new file mode 160000 index 0000000..70bd0c0 --- /dev/null +++ b/network/kismet/src @@ -0,0 +1 @@ +Subproject commit 70bd0c0464ce26b6bce6f1be103747c56ce6af88