UPDATE: Aircrack-ng 1.6

2021-08-21 Thread Brad Smith
Here is an update to Aircrack-ng 1.6.

Other than building the package that is all I have tested on amd64
and i386.

Any users familiar with Aircrack-ng able to test this out?


Index: Makefile
===
RCS file: /home/cvs/ports/security/aircrack-ng/Makefile,v
retrieving revision 1.33
diff -u -p -u -p -r1.33 Makefile
--- Makefile27 Dec 2020 18:13:18 -  1.33
+++ Makefile20 Aug 2021 00:21:44 -
@@ -1,8 +1,8 @@
 # $OpenBSD: Makefile,v 1.33 2020/12/27 18:13:18 sthen Exp $
 
 COMMENT=   802.11 WEP and WPA-PSK keys cracking program
-DISTNAME=  aircrack-ng-1.5.2
-REVISION=  6
+
+DISTNAME=  aircrack-ng-1.6
 CATEGORIES=security
 
 HOMEPAGE=  https://www.aircrack-ng.org/
@@ -10,8 +10,7 @@ HOMEPAGE= https://www.aircrack-ng.org/
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB+=  c pthread crypto z pcre
-WANTLIB+=  ${COMPILER_LIBCXX} m sqlite3
+WANTLIB+=  ${COMPILER_LIBCXX} c crypto m pcre pthread sqlite3 ssl z
 
 MASTER_SITES=  https://download.aircrack-ng.org/
 
@@ -23,10 +22,6 @@ LIB_DEPENDS= databases/sqlite3 \
 RUN_DEPENDS+=  net/arp-scan,-mac>=20190128
 
 USE_GMAKE= Yes
-.if ${MACHINE_ARCH} == "i386"
-# ld: error: undefined symbol: __i686.get_pc_thunk.bx
-USE_LLD=   No
-.endif
 LIBTOOL_FLAGS= --tag=disable-static
 AUTOCONF_VERSION=  2.69
 AUTOMAKE_VERSION=  1.16
@@ -56,8 +51,7 @@ PKG_ARGS+=  -Darm=0
 MAKE_ENV+=  ALTIVEC=false POWER8=false
 .endif
 
-
 pre-configure:
-   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng.h
+   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng/airodump-ng.c
 
 .include 
Index: distinfo
===
RCS file: /home/cvs/ports/security/aircrack-ng/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo23 Feb 2019 22:23:25 -  1.4
+++ distinfo20 Aug 2021 00:21:44 -
@@ -1,2 +1,2 @@
-SHA256 (aircrack-ng-1.5.2.tar.gz) = 
nlkv52WARiIOCsCm0FxAJpA/MHeySIk+AFbMvk7ogkE=
-SIZE (aircrack-ng-1.5.2.tar.gz) = 7138360
+SHA256 (aircrack-ng-1.6.tar.gz) = Twv9SG78bqcin3+8VDQP+LIJSg1z6fYX4KOfh4mZokc=
+SIZE (aircrack-ng-1.6.tar.gz) = 7933308
Index: patches/patch-build_m4_aircrack_ng_simd_m4
===
RCS file: patches/patch-build_m4_aircrack_ng_simd_m4
diff -N patches/patch-build_m4_aircrack_ng_simd_m4
--- patches/patch-build_m4_aircrack_ng_simd_m4  13 Jun 2020 17:38:49 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,25 +0,0 @@
-$OpenBSD: patch-build_m4_aircrack_ng_simd_m4,v 1.1 2020/06/13 17:38:49 cwen 
Exp $
-
-Ensure that disabling AltiVec and POWER8 instructions with MAKE_ENV is honoured
-even if the build machine supports them, from:
-https://github.com/aircrack-ng/aircrack-ng/issues/1941
-
-Index: build/m4/aircrack_ng_simd.m4
 build/m4/aircrack_ng_simd.m4.orig
-+++ build/m4/aircrack_ng_simd.m4
-@@ -132,7 +132,6 @@ then
- AX_CHECK_COMPILE_FLAG([-maltivec], [
- AX_APPEND_FLAG(-maltivec, [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--ALTIVEC_FOUND=1
- ])
- 
- AX_CHECK_COMPILE_FLAG([-mabi=altivec], [
-@@ -148,7 +147,6 @@ then
- AX_CHECK_COMPILE_FLAG([-mpower8-vector], [
- AX_APPEND_FLAG(-mpower8-vector, 
[ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--POWER8_FOUND=1
- ])
- fi
- 
Index: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
===
RCS file: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
diff -N patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-include_aircrack-ng_crypto_sha1-sse2_h20 Aug 2021 
00:21:44 -
@@ -0,0 +1,365 @@
+$OpenBSD$
+
+chore: remove unused assembly routines
+
+Index: include/aircrack-ng/crypto/sha1-sse2.h
+--- include/aircrack-ng/crypto/sha1-sse2.h.orig
 include/aircrack-ng/crypto/sha1-sse2.h
+@@ -36,357 +36,3 @@
+ #include 
+ 
+ #include 
+-
+-#if defined(__i386__) || ((defined(__x86_64__) && !defined(__CYGWIN__))   
 \
+-|| (defined(__x86_64__) && 
defined(__CYGWIN__)   \
+-&& 
!defined(__clang__)))
+-
+-#ifdef OLD_SSE_CORE
+-void show_result(char * key, unsigned char * pmk)
+-{
+-  int i;
+-  printf("%-14s ", key);
+-  for (i = 0; i < 32; i++) printf("%.2X", pmk[i]);
+-  printf("\n");
+-}
+-
+-#endif
+-extern int shasse2_init(unsigned char ctx[80]) __attribute__((regparm(1)));
+-
+-extern int shasse2_ends(unsigned char ctx[80], unsigned char digests[80])
+-  __attribute__((regparm(2)));
+-
+-extern int sha

Re: UPDATE: Aircrack-ng 1.6

2021-08-27 Thread Brad Smith

On 8/20/2021 11:12 PM, Brad Smith wrote:

Here is an update to Aircrack-ng 1.6.

Other than building the package that is all I have tested on amd64
and i386.

Any users familiar with Aircrack-ng able to test this out?


Anyone?


Index: Makefile
===
RCS file: /home/cvs/ports/security/aircrack-ng/Makefile,v
retrieving revision 1.33
diff -u -p -u -p -r1.33 Makefile
--- Makefile27 Dec 2020 18:13:18 -  1.33
+++ Makefile20 Aug 2021 00:21:44 -
@@ -1,8 +1,8 @@
  # $OpenBSD: Makefile,v 1.33 2020/12/27 18:13:18 sthen Exp $
  
  COMMENT=		802.11 WEP and WPA-PSK keys cracking program

-DISTNAME=  aircrack-ng-1.5.2
-REVISION=  6
+
+DISTNAME=  aircrack-ng-1.6
  CATEGORIES=   security
  
  HOMEPAGE=		https://www.aircrack-ng.org/

@@ -10,8 +10,7 @@ HOMEPAGE= https://www.aircrack-ng.org/
  # GPLv2
  PERMIT_PACKAGE=   Yes
  
-WANTLIB+=		c pthread crypto z pcre

-WANTLIB+=  ${COMPILER_LIBCXX} m sqlite3
+WANTLIB+=  ${COMPILER_LIBCXX} c crypto m pcre pthread sqlite3 ssl z
  
  MASTER_SITES=		https://download.aircrack-ng.org/
  
@@ -23,10 +22,6 @@ LIB_DEPENDS=		databases/sqlite3 \

  RUN_DEPENDS+= net/arp-scan,-mac>=20190128
  
  USE_GMAKE=		Yes

-.if ${MACHINE_ARCH} == "i386"
-# ld: error: undefined symbol: __i686.get_pc_thunk.bx
-USE_LLD=   No
-.endif
  LIBTOOL_FLAGS=--tag=disable-static
  AUTOCONF_VERSION= 2.69
  AUTOMAKE_VERSION= 1.16
@@ -56,8 +51,7 @@ PKG_ARGS+=  -Darm=0
  MAKE_ENV+=  ALTIVEC=false POWER8=false
  .endif
  
-

  pre-configure:
-   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng.h
+   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng/airodump-ng.c
  
  .include 

Index: distinfo
===
RCS file: /home/cvs/ports/security/aircrack-ng/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo23 Feb 2019 22:23:25 -  1.4
+++ distinfo20 Aug 2021 00:21:44 -
@@ -1,2 +1,2 @@
-SHA256 (aircrack-ng-1.5.2.tar.gz) = 
nlkv52WARiIOCsCm0FxAJpA/MHeySIk+AFbMvk7ogkE=
-SIZE (aircrack-ng-1.5.2.tar.gz) = 7138360
+SHA256 (aircrack-ng-1.6.tar.gz) = Twv9SG78bqcin3+8VDQP+LIJSg1z6fYX4KOfh4mZokc=
+SIZE (aircrack-ng-1.6.tar.gz) = 7933308
Index: patches/patch-build_m4_aircrack_ng_simd_m4
===
RCS file: patches/patch-build_m4_aircrack_ng_simd_m4
diff -N patches/patch-build_m4_aircrack_ng_simd_m4
--- patches/patch-build_m4_aircrack_ng_simd_m4  13 Jun 2020 17:38:49 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,25 +0,0 @@
-$OpenBSD: patch-build_m4_aircrack_ng_simd_m4,v 1.1 2020/06/13 17:38:49 cwen 
Exp $
-
-Ensure that disabling AltiVec and POWER8 instructions with MAKE_ENV is honoured
-even if the build machine supports them, from:
-https://github.com/aircrack-ng/aircrack-ng/issues/1941
-
-Index: build/m4/aircrack_ng_simd.m4
 build/m4/aircrack_ng_simd.m4.orig
-+++ build/m4/aircrack_ng_simd.m4
-@@ -132,7 +132,6 @@ then
- AX_CHECK_COMPILE_FLAG([-maltivec], [
- AX_APPEND_FLAG(-maltivec, [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--ALTIVEC_FOUND=1
- ])
-
- AX_CHECK_COMPILE_FLAG([-mabi=altivec], [
-@@ -148,7 +147,6 @@ then
- AX_CHECK_COMPILE_FLAG([-mpower8-vector], [
- AX_APPEND_FLAG(-mpower8-vector, 
[ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--POWER8_FOUND=1
- ])
- fi
-
Index: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
===
RCS file: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
diff -N patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-include_aircrack-ng_crypto_sha1-sse2_h20 Aug 2021 
00:21:44 -
@@ -0,0 +1,365 @@
+$OpenBSD$
+
+chore: remove unused assembly routines
+
+Index: include/aircrack-ng/crypto/sha1-sse2.h
+--- include/aircrack-ng/crypto/sha1-sse2.h.orig
 include/aircrack-ng/crypto/sha1-sse2.h
+@@ -36,357 +36,3 @@
+ #include 
+
+ #include 
+-
+-#if defined(__i386__) || ((defined(__x86_64__) && !defined(__CYGWIN__))   
 \
+-|| (defined(__x86_64__) && 
defined(__CYGWIN__)   \
+-&& 
!defined(__clang__)))
+-
+-#ifdef OLD_SSE_CORE
+-void show_result(char * key, unsigned char * pmk)
+-{
+-  int i;
+-  printf("%-14s ", key);
+-  for (i = 0; i < 32; i++) printf("%.2X", pmk[i]);
+-  printf("\n");
+-}
+-
+-#endif
+-extern int shasse2_init(unsigned char ctx[80]) __attribute__((regparm(1)));
+-
+-extern int shasse2_ends(unsigned char ctx[80], unsigned char digests[80])
+-  __attribute__((regparm(2)));

Re: UPDATE: Aircrack-ng 1.6

2021-09-02 Thread Stuart Henderson
On 2021/08/27 01:10, Brad Smith wrote:
> On 8/20/2021 11:12 PM, Brad Smith wrote:
> > Here is an update to Aircrack-ng 1.6.
> > 
> > Other than building the package that is all I have tested on amd64
> > and i386.
> > 
> > Any users familiar with Aircrack-ng able to test this out?
> 
> Anyone?

I haven't looked into runtime, but the test suite goes a lot better
with USE_LIBTOOL=gnu..

> > Index: Makefile
> > ===
> > RCS file: /home/cvs/ports/security/aircrack-ng/Makefile,v
> > retrieving revision 1.33
> > diff -u -p -u -p -r1.33 Makefile
> > --- Makefile27 Dec 2020 18:13:18 -  1.33
> > +++ Makefile20 Aug 2021 00:21:44 -
> > @@ -1,8 +1,8 @@
> >   # $OpenBSD: Makefile,v 1.33 2020/12/27 18:13:18 sthen Exp $
> >   COMMENT=  802.11 WEP and WPA-PSK keys cracking program
> > -DISTNAME=  aircrack-ng-1.5.2
> > -REVISION=  6
> > +
> > +DISTNAME=  aircrack-ng-1.6
> >   CATEGORIES=   security
> >   HOMEPAGE= https://www.aircrack-ng.org/
> > @@ -10,8 +10,7 @@ HOMEPAGE= https://www.aircrack-ng.org/
> >   # GPLv2
> >   PERMIT_PACKAGE=   Yes
> > -WANTLIB+=  c pthread crypto z pcre
> > -WANTLIB+=  ${COMPILER_LIBCXX} m sqlite3
> > +WANTLIB+=  ${COMPILER_LIBCXX} c crypto m pcre pthread sqlite3 ssl z
> >   MASTER_SITES= https://download.aircrack-ng.org/
> > @@ -23,10 +22,6 @@ LIB_DEPENDS= databases/sqlite3 \
> >   RUN_DEPENDS+= net/arp-scan,-mac>=20190128
> >   USE_GMAKE=Yes
> > -.if ${MACHINE_ARCH} == "i386"
> > -# ld: error: undefined symbol: __i686.get_pc_thunk.bx
> > -USE_LLD=   No
> > -.endif
> >   LIBTOOL_FLAGS=--tag=disable-static
> >   AUTOCONF_VERSION= 2.69
> >   AUTOMAKE_VERSION= 1.16
> > @@ -56,8 +51,7 @@ PKG_ARGS+=  -Darm=0
> >   MAKE_ENV+=  ALTIVEC=false POWER8=false
> >   .endif
> > -
> >   pre-configure:
> > -   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng.h
> > +   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng/airodump-ng.c
> >   .include 
> > Index: distinfo
> > ===
> > RCS file: /home/cvs/ports/security/aircrack-ng/distinfo,v
> > retrieving revision 1.4
> > diff -u -p -u -p -r1.4 distinfo
> > --- distinfo23 Feb 2019 22:23:25 -  1.4
> > +++ distinfo20 Aug 2021 00:21:44 -
> > @@ -1,2 +1,2 @@
> > -SHA256 (aircrack-ng-1.5.2.tar.gz) = 
> > nlkv52WARiIOCsCm0FxAJpA/MHeySIk+AFbMvk7ogkE=
> > -SIZE (aircrack-ng-1.5.2.tar.gz) = 7138360
> > +SHA256 (aircrack-ng-1.6.tar.gz) = 
> > Twv9SG78bqcin3+8VDQP+LIJSg1z6fYX4KOfh4mZokc=
> > +SIZE (aircrack-ng-1.6.tar.gz) = 7933308
> > Index: patches/patch-build_m4_aircrack_ng_simd_m4
> > ===
> > RCS file: patches/patch-build_m4_aircrack_ng_simd_m4
> > diff -N patches/patch-build_m4_aircrack_ng_simd_m4
> > --- patches/patch-build_m4_aircrack_ng_simd_m4  13 Jun 2020 17:38:49 
> > -  1.1
> > +++ /dev/null   1 Jan 1970 00:00:00 -
> > @@ -1,25 +0,0 @@
> > -$OpenBSD: patch-build_m4_aircrack_ng_simd_m4,v 1.1 2020/06/13 17:38:49 
> > cwen Exp $
> > -
> > -Ensure that disabling AltiVec and POWER8 instructions with MAKE_ENV is 
> > honoured
> > -even if the build machine supports them, from:
> > -https://github.com/aircrack-ng/aircrack-ng/issues/1941
> > -
> > -Index: build/m4/aircrack_ng_simd.m4
> >  build/m4/aircrack_ng_simd.m4.orig
> > -+++ build/m4/aircrack_ng_simd.m4
> > -@@ -132,7 +132,6 @@ then
> > - AX_CHECK_COMPILE_FLAG([-maltivec], [
> > - AX_APPEND_FLAG(-maltivec, [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
> > - AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
> > --ALTIVEC_FOUND=1
> > - ])
> > -
> > - AX_CHECK_COMPILE_FLAG([-mabi=altivec], [
> > -@@ -148,7 +147,6 @@ then
> > - AX_CHECK_COMPILE_FLAG([-mpower8-vector], [
> > - AX_APPEND_FLAG(-mpower8-vector, 
> > [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
> > - AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
> > --POWER8_FOUND=1
> > - ])
> > - fi
> > -
> > Index: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
> > ===
> > RCS file: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
> > diff -N patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
> > --- /dev/null   1 Jan 1970 00:00:00 -
> > +++ patches/patch-include_aircrack-ng_crypto_sha1-sse2_h20 Aug 2021 
> > 00:21:44 -
> > @@ -0,0 +1,365 @@
> > +$OpenBSD$
> > +
> > +chore: remove unused assembly routines
> > +
> > +Index: include/aircrack-ng/crypto/sha1-sse2.h
> > +--- include/aircrack-ng/crypto/sha1-sse2.h.orig
> >  include/aircrack-ng/crypto/sha1-sse2.h
> > +@@ -36,357 +36,3 @@
> > + #include 
> > +
> > + #include 
> > +-
> > +-#if defined(__i386__) || ((defined(__x86_64__) && !defined(__CYGWIN__)) 

Re: UPDATE: Aircrack-ng 1.6

2021-10-19 Thread Brad Smith

On 9/2/2021 6:28 PM, Brad Smith wrote:


On Fri, Aug 27, 2021 at 01:10:52AM -0400, Brad Smith wrote:

On 8/20/2021 11:12 PM, Brad Smith wrote:

Here is an update to Aircrack-ng 1.6.

Other than building the package that is all I have tested on amd64
and i386.

Any users familiar with Aircrack-ng able to test this out?

Make use of GNU libtool. As Stuart pointed out the regress tests
pass in full with this. Without, 21 out of 38 fail.

Any Aircrack users?


Index: Makefile
===
RCS file: /home/cvs/ports/security/aircrack-ng/Makefile,v
retrieving revision 1.33
diff -u -p -u -p -r1.33 Makefile
--- Makefile27 Dec 2020 18:13:18 -  1.33
+++ Makefile2 Sep 2021 22:16:49 -
@@ -1,8 +1,8 @@
  # $OpenBSD: Makefile,v 1.33 2020/12/27 18:13:18 sthen Exp $
  
  COMMENT=		802.11 WEP and WPA-PSK keys cracking program

-DISTNAME=  aircrack-ng-1.5.2
-REVISION=  6
+
+DISTNAME=  aircrack-ng-1.6
  CATEGORIES=   security
  
  HOMEPAGE=		https://www.aircrack-ng.org/

@@ -10,8 +10,7 @@ HOMEPAGE= https://www.aircrack-ng.org/
  # GPLv2
  PERMIT_PACKAGE=   Yes
  
-WANTLIB+=		c pthread crypto z pcre

-WANTLIB+=  ${COMPILER_LIBCXX} m sqlite3
+WANTLIB+=  ${COMPILER_LIBCXX} c crypto m pcre pthread sqlite3 ssl z
  
  MASTER_SITES=		https://download.aircrack-ng.org/
  
@@ -22,11 +21,8 @@ LIB_DEPENDS=		databases/sqlite3 \
  
  RUN_DEPENDS+=		net/arp-scan,-mac>=20190128
  
+USE_LIBTOOL=		gnu

  USE_GMAKE=Yes
-.if ${MACHINE_ARCH} == "i386"
-# ld: error: undefined symbol: __i686.get_pc_thunk.bx
-USE_LLD=   No
-.endif
  LIBTOOL_FLAGS=--tag=disable-static
  AUTOCONF_VERSION= 2.69
  AUTOMAKE_VERSION= 1.16
@@ -56,8 +52,7 @@ PKG_ARGS+=  -Darm=0
  MAKE_ENV+=  ALTIVEC=false POWER8=false
  .endif
  
-

  pre-configure:
-   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng.h
+   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng/airodump-ng.c
  
  .include 

Index: distinfo
===
RCS file: /home/cvs/ports/security/aircrack-ng/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo23 Feb 2019 22:23:25 -  1.4
+++ distinfo20 Aug 2021 00:21:44 -
@@ -1,2 +1,2 @@
-SHA256 (aircrack-ng-1.5.2.tar.gz) = 
nlkv52WARiIOCsCm0FxAJpA/MHeySIk+AFbMvk7ogkE=
-SIZE (aircrack-ng-1.5.2.tar.gz) = 7138360
+SHA256 (aircrack-ng-1.6.tar.gz) = Twv9SG78bqcin3+8VDQP+LIJSg1z6fYX4KOfh4mZokc=
+SIZE (aircrack-ng-1.6.tar.gz) = 7933308
Index: patches/patch-build_m4_aircrack_ng_simd_m4
===
RCS file: patches/patch-build_m4_aircrack_ng_simd_m4
diff -N patches/patch-build_m4_aircrack_ng_simd_m4
--- patches/patch-build_m4_aircrack_ng_simd_m4  13 Jun 2020 17:38:49 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,25 +0,0 @@
-$OpenBSD: patch-build_m4_aircrack_ng_simd_m4,v 1.1 2020/06/13 17:38:49 cwen 
Exp $
-
-Ensure that disabling AltiVec and POWER8 instructions with MAKE_ENV is honoured
-even if the build machine supports them, from:
-https://github.com/aircrack-ng/aircrack-ng/issues/1941
-
-Index: build/m4/aircrack_ng_simd.m4
 build/m4/aircrack_ng_simd.m4.orig
-+++ build/m4/aircrack_ng_simd.m4
-@@ -132,7 +132,6 @@ then
- AX_CHECK_COMPILE_FLAG([-maltivec], [
- AX_APPEND_FLAG(-maltivec, [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--ALTIVEC_FOUND=1
- ])
-
- AX_CHECK_COMPILE_FLAG([-mabi=altivec], [
-@@ -148,7 +147,6 @@ then
- AX_CHECK_COMPILE_FLAG([-mpower8-vector], [
- AX_APPEND_FLAG(-mpower8-vector, 
[ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--POWER8_FOUND=1
- ])
- fi
-
Index: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
===
RCS file: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
diff -N patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-include_aircrack-ng_crypto_sha1-sse2_h20 Aug 2021 
00:21:44 -
@@ -0,0 +1,365 @@
+$OpenBSD$
+
+chore: remove unused assembly routines
+
+Index: include/aircrack-ng/crypto/sha1-sse2.h
+--- include/aircrack-ng/crypto/sha1-sse2.h.orig
 include/aircrack-ng/crypto/sha1-sse2.h
+@@ -36,357 +36,3 @@
+ #include 
+
+ #include 
+-
+-#if defined(__i386__) || ((defined(__x86_64__) && !defined(__CYGWIN__))   
 \
+-|| (defined(__x86_64__) && 
defined(__CYGWIN__)   \
+-&& 
!defined(__clang__)))
+-
+-#ifdef OLD_SSE_CORE
+-void show_result(char * key, unsigned char * pmk)
+-{
+-  int i;
+-  printf("%-14s ", key);
+-  for (i = 0; i < 32; i++) p

Re: UPDATE: Aircrack-ng 1.6

2021-10-19 Thread Stuart Henderson
On 2021/10/18 23:37, Brad Smith wrote:
> On 9/2/2021 6:28 PM, Brad Smith wrote:
> 
> > On Fri, Aug 27, 2021 at 01:10:52AM -0400, Brad Smith wrote:
> > > On 8/20/2021 11:12 PM, Brad Smith wrote:
> > > > Here is an update to Aircrack-ng 1.6.
> > > > 
> > > > Other than building the package that is all I have tested on amd64
> > > > and i386.
> > > > 
> > > > Any users familiar with Aircrack-ng able to test this out?
> > Make use of GNU libtool. As Stuart pointed out the regress tests
> > pass in full with this. Without, 21 out of 38 fail.
> Any Aircrack users?

They'll probably show up if we remove it!



Re: UPDATE: Aircrack-ng 1.6

2021-10-23 Thread Brad Smith
On Thu, Sep 02, 2021 at 06:28:52PM -0400, Brad Smith wrote:
> On Fri, Aug 27, 2021 at 01:10:52AM -0400, Brad Smith wrote:
> > On 8/20/2021 11:12 PM, Brad Smith wrote:
> > > Here is an update to Aircrack-ng 1.6.
> > > 
> > > Other than building the package that is all I have tested on amd64
> > > and i386.
> > > 
> > > Any users familiar with Aircrack-ng able to test this out?
> 
> Make use of GNU libtool. As Stuart pointed out the regress tests
> pass in full with this. Without, 21 out of 38 fail.

An updated diff.

Pull out the arm bits as it doesn't build anyway.

I was looking through aircrack-ng code and noticed a function
using hw.ncpu to retrieve the number of CPUs so I added
hw.ncpuonline support as well as hw.physmem64 support for
another function.


Index: Makefile
===
RCS file: /cvs/ports/security/aircrack-ng/Makefile,v
retrieving revision 1.33
diff -u -p -u -p -r1.33 Makefile
--- Makefile27 Dec 2020 18:13:18 -  1.33
+++ Makefile23 Oct 2021 07:03:13 -
@@ -1,8 +1,8 @@
 # $OpenBSD: Makefile,v 1.33 2020/12/27 18:13:18 sthen Exp $
 
 COMMENT=   802.11 WEP and WPA-PSK keys cracking program
-DISTNAME=  aircrack-ng-1.5.2
-REVISION=  6
+
+DISTNAME=  aircrack-ng-1.6
 CATEGORIES=security
 
 HOMEPAGE=  https://www.aircrack-ng.org/
@@ -10,8 +10,7 @@ HOMEPAGE= https://www.aircrack-ng.org/
 # GPLv2
 PERMIT_PACKAGE=Yes
 
-WANTLIB+=  c pthread crypto z pcre
-WANTLIB+=  ${COMPILER_LIBCXX} m sqlite3
+WANTLIB+=  ${COMPILER_LIBCXX} c crypto m pcre pthread sqlite3 ssl z
 
 MASTER_SITES=  https://download.aircrack-ng.org/
 
@@ -22,11 +21,8 @@ LIB_DEPENDS= databases/sqlite3 \
 
 RUN_DEPENDS+=  net/arp-scan,-mac>=20190128
 
+USE_LIBTOOL=   gnu
 USE_GMAKE= Yes
-.if ${MACHINE_ARCH} == "i386"
-# ld: error: undefined symbol: __i686.get_pc_thunk.bx
-USE_LLD=   No
-.endif
 LIBTOOL_FLAGS= --tag=disable-static
 AUTOCONF_VERSION=  2.69
 AUTOMAKE_VERSION=  1.16
@@ -44,20 +40,14 @@ PKG_ARGS+=  -Dx86=1
 .else
 PKG_ARGS+=  -Dx86=0
 .endif
-# XXX PFRAG.arm files relate to NEON optimizations, disabled above.
-#.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "aarch64"
-#PKG_ARGS+=  -Darm=1
-#.else
-PKG_ARGS+=  -Darm=0
-#.endif
+
 # XXX AltiVec optimizations can't be built with clang, and POWER8 ones
 # are useless on powerpc
 .if ${MACHINE_ARCH} == "powerpc"
 MAKE_ENV+=  ALTIVEC=false POWER8=false
 .endif
 
-
 pre-configure:
-   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng.h
+   ${SUBST_CMD} ${WRKSRC}/src/airodump-ng/airodump-ng.c
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/security/aircrack-ng/distinfo,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 distinfo
--- distinfo23 Feb 2019 22:23:25 -  1.4
+++ distinfo23 Oct 2021 07:03:13 -
@@ -1,2 +1,2 @@
-SHA256 (aircrack-ng-1.5.2.tar.gz) = 
nlkv52WARiIOCsCm0FxAJpA/MHeySIk+AFbMvk7ogkE=
-SIZE (aircrack-ng-1.5.2.tar.gz) = 7138360
+SHA256 (aircrack-ng-1.6.tar.gz) = Twv9SG78bqcin3+8VDQP+LIJSg1z6fYX4KOfh4mZokc=
+SIZE (aircrack-ng-1.6.tar.gz) = 7933308
Index: patches/patch-build_m4_aircrack_ng_simd_m4
===
RCS file: patches/patch-build_m4_aircrack_ng_simd_m4
diff -N patches/patch-build_m4_aircrack_ng_simd_m4
--- patches/patch-build_m4_aircrack_ng_simd_m4  13 Jun 2020 17:38:49 -  
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -
@@ -1,25 +0,0 @@
-$OpenBSD: patch-build_m4_aircrack_ng_simd_m4,v 1.1 2020/06/13 17:38:49 cwen 
Exp $
-
-Ensure that disabling AltiVec and POWER8 instructions with MAKE_ENV is honoured
-even if the build machine supports them, from:
-https://github.com/aircrack-ng/aircrack-ng/issues/1941
-
-Index: build/m4/aircrack_ng_simd.m4
 build/m4/aircrack_ng_simd.m4.orig
-+++ build/m4/aircrack_ng_simd.m4
-@@ -132,7 +132,6 @@ then
- AX_CHECK_COMPILE_FLAG([-maltivec], [
- AX_APPEND_FLAG(-maltivec, [ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--ALTIVEC_FOUND=1
- ])
- 
- AX_CHECK_COMPILE_FLAG([-mabi=altivec], [
-@@ -148,7 +147,6 @@ then
- AX_CHECK_COMPILE_FLAG([-mpower8-vector], [
- AX_APPEND_FLAG(-mpower8-vector, 
[ppc_altivec_[]_AC_LANG_ABBREV[]flags])
- AC_SUBST(ppc_altivec_[]_AC_LANG_ABBREV[]flags)
--POWER8_FOUND=1
- ])
- fi
- 
Index: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
===
RCS file: patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
diff -N patches/patch-include_aircrack-ng_crypto_sha1-sse2_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-include_aircrack-ng_crypto_sha1-sse2