You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
2.2 KiB

  1. # Copyright (C) 2019 Diana Dragusin <diana.dragusin@nccgroup.com>
  2. # Copyright (C) 2019 Etienne Champetier <champetier.etienne@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v3.
  5. # See <http://www.gnu.org/licenses/> for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=phantap
  8. PKG_RELEASE:=1
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_URL:=https://github.com/nccgroup/phantap
  11. PKG_MIRROR_HASH:=0751687e35c8f4a56e2cbeae7b16a5d9b8f8ec4c58e315ee8675064f5ae2d899
  12. PKG_SOURCE_DATE:=2019.08.25
  13. PKG_SOURCE_VERSION:=2ccec016b1a30338fe5764424e1e16534239abb9
  14. PKG_MAINTAINER:=Diana Dragusin <diana.dragusin@nccgroup.com>, \
  15. Etienne Champetier <champetier.etienne@gmail.com>
  16. PKG_LICENSE:=GPL-3.0-only
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. CMAKE_SOURCE_SUBDIR:=src
  20. define Package/phantap/Default
  21. SECTION:=net
  22. CATEGORY:=Network
  23. URL:=https://github.com/nccgroup/phantap
  24. endef
  25. define Package/phantap
  26. $(call Package/phantap/Default)
  27. TITLE:=PhanTap
  28. PKGARCH:=all
  29. DEPENDS:=+ebtables +libpcap +ip-full +kmod-br-netfilter +kmod-ebtables-ipv4
  30. endef
  31. define Package/phantap/conffiles
  32. /etc/config/phantap
  33. endef
  34. define Package/phantap/description
  35. PhanTap or Phantom tap is a small set of scripts and C code that allow you to setup a
  36. network tap that automatically impersonate a victim device, allowing you to access
  37. internet using the IP & MAC of the victim.
  38. endef
  39. define Package/phantap/install
  40. $(INSTALL_DIR) $(1)/etc/config
  41. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/config/phantap $(1)/etc/config/
  42. $(INSTALL_DIR) $(1)/etc/hotplug.d/iface
  43. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/hotplug.d/iface/00-phantap $(1)/etc/hotplug.d/iface/
  44. $(INSTALL_DIR) $(1)/etc/hotplug.d/net
  45. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/hotplug.d/net/00-phantap $(1)/etc/hotplug.d/net/
  46. $(INSTALL_DIR) $(1)/etc/init.d
  47. $(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/phantap $(1)/etc/init.d/
  48. $(INSTALL_DIR) $(1)/etc/sysctl.d
  49. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/sysctl.d/12-phantap.conf $(1)/etc/sysctl.d/
  50. $(INSTALL_DIR) $(1)/usr/sbin
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phantap-learn $(1)/usr/sbin/
  52. endef
  53. $(eval $(call BuildPackage,phantap))