2 # Copyright (C) 2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
13 PKG_SOURCE:=airpwn-$(PKG_VERSION).tgz
14 PKG_SOURCE_URL:=@SF/airpwn
15 PKG_BUILD_DEPENDS:=libnet1 libopenssl libpcap libpcre
19 include $(INCLUDE_DIR)/package.mk
24 TITLE:=Packet injection pwnage
25 DEPENDS:=+libnet1 +libopenssl +libpcap +libpcre
28 define Package/airpwn/description
29 Airpwn is a framework for 802.11 (wireless) packet injection.
30 Airpwn listens to incoming wireless packets, and if the data
31 matches a pattern specified in the config files, custom content
32 is injected "spoofed" from the wireless access point. From the
33 perspective of the wireless client, airpwn becomes the server.
39 CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/lib/libnet-1.1.x/include -I$(STAGING_DIR)/usr/include -I$(PKG_BUILD_DIR)/lorcon" \
40 LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/libnet-1.1.x/lib -L$(PKG_BUILD_DIR)/lorcon/.libs -lcrypto -lssl" \
41 LIBTOOL="$(STAGING_DIR)/host/bin/libtool"
43 define Build/Configure
44 ( cd $(PKG_BUILD_DIR); tar -xzf lorcon-current.tgz; cd lorcon; \
45 $(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS); \
46 $(MAKE) -C $(PKG_BUILD_DIR)/lorcon $(CONFIGURE_VARS); cd ..; \
47 $(CONFIGURE_VARS) ./configure $(CONFIGURE_ARGS) )
51 $(MAKE) -C $(PKG_BUILD_DIR) $(CONFIGURE_VARS)
54 define Package/airpwn/install
55 $(INSTALL_DIR) $(1)/etc/airpwn
56 $(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/* $(1)/etc/airpwn/
57 $(INSTALL_DIR) $(1)/usr/bin
58 $(INSTALL_BIN) $(PKG_BUILD_DIR)/airpwn $(1)/usr/bin/
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(INSTALL_BIN) $(PKG_BUILD_DIR)/lorcon/.libs/liborcon-1.0.0.so $(1)/usr/lib/
61 ( cd $(1)/usr/lib; ln -s liborcon-1.0.0.so liborcon.so )
64 $(eval $(call BuildPackage,airpwn))