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.

64 lines
2.1 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:=b5a8658d9347bb7bc295a224f8f546582ca8a766e904b8004cd0a19d7b65d400
  12. PKG_SOURCE_DATE:=2022.02.12
  13. PKG_SOURCE_VERSION:=e80be64901c96f9340d33f79d719faf3d93cd7f0
  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:=+libpcap +libnl-tiny +ip-full +kmod-nft-bridge
  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_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/phantap-early $(1)/etc/init.d/
  49. $(INSTALL_DIR) $(1)/usr/sbin
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phantap-learn $(1)/usr/sbin/
  51. endef
  52. $(eval $(call BuildPackage,phantap))