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:=bee0ed1ab620c740764009722d1281778371c48a85697d1189498a269b548fc5
  12. PKG_SOURCE_DATE:=2019.08.28
  13. PKG_SOURCE_VERSION:=758fba1b7d48080ad14a1dc0062b86667b298ecb
  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))