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.

66 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:=d625970df1f3757d0805b956bcb721bcc6fa102e397cd3e16e558be8bec8abb3
  12. PKG_SOURCE_DATE:=2020.12.31
  13. PKG_SOURCE_VERSION:=a71772357301e10e9d8bc2d512505c9c5a4a18a4
  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 +libnl-tiny +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_BIN) $(PKG_BUILD_DIR)/files/etc/init.d/phantap-early $(1)/etc/init.d/
  49. $(INSTALL_DIR) $(1)/etc/sysctl.d
  50. $(INSTALL_DATA) $(PKG_BUILD_DIR)/files/etc/sysctl.d/12-phantap.conf $(1)/etc/sysctl.d/
  51. $(INSTALL_DIR) $(1)/usr/sbin
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/phantap-learn $(1)/usr/sbin/
  53. endef
  54. $(eval $(call BuildPackage,phantap))