[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#642698: GNU/kFreeBSD support



Package: aircrack-ng
Version: 1:1.1-1.1
Severity: important
Tags: patch
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

This patch adds support for GNU/kFreeBSD to aircrack-ng.

I've verified that at least airodump-ng works (but I didn't break into^W^W
audit security of any of my neighbours' WLANs yet).

I've already submitted the relevant parts to upstream:

  http://trac.aircrack-ng.org/ticket/944
  http://trac.aircrack-ng.org/ticket/945

-- System Information:
Debian Release: 6.0.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 8.1-1-amd64
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages aircrack-ng depends on:
ii  libc0.1                 2.11.2-10        Embedded GNU C Library: Shared lib
ii  libsqlite3-0            3.7.3-1          SQLite 3 shared library
ii  libssl0.9.8             0.9.8o-4squeeze2 SSL shared libraries
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

aircrack-ng recommends no packages.

aircrack-ng suggests no packages.

-- no debconf information
=== modified file 'common.mak'
--- common.mak	2011-09-24 15:24:07 +0000
+++ common.mak	2011-09-24 15:27:39 +0000
@@ -2,7 +2,7 @@ ifndef TOOL_PREFIX
 TOOL_PREFIX	=
 endif
 ifndef OSNAME
-OSNAME		= $(shell uname -s | sed -e 's/.*CYGWIN.*/cygwin/g')
+OSNAME		= $(shell uname -s | sed -e 's/.*CYGWIN.*/cygwin/g' -e 's,/,-,g')
 endif
 ifndef SQLITE
 SQLITE		= false

=== modified file 'debian/control'
--- debian/control	2011-09-24 15:24:07 +0000
+++ debian/control	2011-09-24 15:31:44 +0000
@@ -4,12 +4,12 @@ Priority: optional
 Maintainer: Adam Cécile (Le_Vert) <gandalf@le-vert.net>
 Uploaders: Samuel Mimram <smimram@debian.org>
 Homepage: http://www.aircrack-ng.org/
-Build-Depends: debhelper (>= 5), libpcap0.8-dev, libssl-dev, libsqlite3-dev (>= 3.4), libnl-dev (>= 1.1)
+Build-Depends: debhelper (>= 5), libpcap0.8-dev, libssl-dev, libsqlite3-dev (>= 3.4), libnl-dev (>= 1.1) [linux-any]
 Standards-Version: 3.8.4
 
 Package: aircrack-ng
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, wireless-tools, iw
+Depends: ${shlibs:Depends}, ${misc:Depends}, wireless-tools [linux-any], iw [linux-any]
 Description: wireless WEP/WPA cracking utilities
  aircrack-ng is an 802.11a/b/g WEP/WPA cracking program that can recover a
  40-bit, 104-bit, 256-bit or 512-bit WEP key once enough encrypted packets have

=== modified file 'scripts/Makefile'
--- scripts/Makefile	2011-09-24 15:24:07 +0000
+++ scripts/Makefile	2011-09-24 16:54:51 +0000
@@ -1,7 +1,7 @@
 AC_ROOT		= ..
 include		$(AC_ROOT)/common.mak
 
-SCRIPTS         = airmon-ng airdriver-ng airodump-ng-oui-update
+SCRIPTS         = airdriver-ng airodump-ng-oui-update
 
 default: all
 
@@ -10,6 +10,13 @@ all:
 	
 install:
 	install -m 755 $(SCRIPTS) $(DESTDIR)$(sbindir)
+ifeq ($(OSNAME), Linux)
+	install -m 755 airmon-ng $(DESTDIR)$(sbindir)/airmon-ng
+endif
+ifeq ($(filter FreeBSD GNU-kFreeBSD, $(OSNAME)),)
+else
+	install -m 755 airmon-ng.freebsd $(DESTDIR)$(sbindir)/airmon-ng
+endif
 
 uninstall:
 	-rm -f $(DESTDIR)$(sbindir)/airmon-ng

=== added file 'scripts/airmon-ng.freebsd'
--- scripts/airmon-ng.freebsd	1970-01-01 00:00:00 +0000
+++ scripts/airmon-ng.freebsd	2011-09-24 16:54:25 +0000
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+cat << EOF
+On $(uname), it is not necessary to use airmon-ng to enable the monitor
+mode of your wireless card. Instead, you need to specify this mode when
+creating your wlan device. For example:
+
+        ifconfig wlan0 create wlandev ath0 wlanmode monitor
+
+EOF
+
+exit 0

=== modified file 'src/osdep/Makefile'
--- src/osdep/Makefile	2011-09-24 15:24:07 +0000
+++ src/osdep/Makefile	2011-09-24 15:28:01 +0000
@@ -41,6 +41,11 @@ all:
 	$(RANLIB) $(LIB)
 	touch $(@)
 
+.os.GNU-kFreeBSD: $(OBJS_FBSD)
+	$(AR) cru $(LIB) $(OBJS_FBSD)
+	$(RANLIB) $(LIB)
+	touch $(@)
+
 .os.OpenBSD: $(OBJS_OBSD)
 	$(AR) cru $(LIB) $(OBJS_OBSD)
 	$(RANLIB) $(LIB)

=== modified file 'src/osdep/freebsd.c'
--- src/osdep/freebsd.c	2011-09-24 15:24:07 +0000
+++ src/osdep/freebsd.c	2011-09-24 15:28:34 +0000
@@ -560,7 +560,7 @@ struct wif *wi_open_osdep(char *iface)
 
 int get_battery_state(void)
 {
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     int value;
     size_t len;
 


Reply to: