[arch-commits] Commit in pyrit/repos (6 files)
Levente Polyak
anthraxx at archlinux.org
Sun Nov 13 21:22:47 UTC 2016
Date: Sunday, November 13, 2016 @ 21:22:47
Author: anthraxx
Revision: 195536
archrelease: copy trunk to community-i686, community-x86_64
Added:
pyrit/repos/community-i686/PKGBUILD
(from rev 195535, pyrit/trunk/PKGBUILD)
pyrit/repos/community-i686/scapy-2.3.2.patch
(from rev 195535, pyrit/trunk/scapy-2.3.2.patch)
pyrit/repos/community-x86_64/PKGBUILD
(from rev 195535, pyrit/trunk/PKGBUILD)
pyrit/repos/community-x86_64/scapy-2.3.2.patch
(from rev 195535, pyrit/trunk/scapy-2.3.2.patch)
Deleted:
pyrit/repos/community-i686/PKGBUILD
pyrit/repos/community-x86_64/PKGBUILD
------------------------------------+
/PKGBUILD | 96 +++++++++++++++++++++++++++++++++++
community-i686/PKGBUILD | 39 --------------
community-i686/scapy-2.3.2.patch | 42 +++++++++++++++
community-x86_64/PKGBUILD | 39 --------------
community-x86_64/scapy-2.3.2.patch | 42 +++++++++++++++
5 files changed, 180 insertions(+), 78 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2016-11-13 21:22:29 UTC (rev 195535)
+++ community-i686/PKGBUILD 2016-11-13 21:22:47 UTC (rev 195536)
@@ -1,39 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Contributor: Fabian Melters <melters [at] gmail [dot] com>
-
-pkgname=pyrit
-pkgver=0.4.0
-pkgrel=3
-pkgdesc="WPA/WPA2-PSK attacking with gpu and cluster"
-url="https://code.google.com/p/pyrit"
-arch=('i686' 'x86_64')
-license=('GPL3')
-depends=('openssl' 'python2' 'zlib' 'libpcap')
-optdepends=(
- 'cpyrit-cuda: nvidia gpu support'
- 'cpyrit-opencl: opencl support'
- 'scapy: packet capture analyzation support'
- 'python2-sqlalchemy: storage support'
-)
-checkdepends=('python2-sqlalchemy' 'scapy')
-source=(${pkgname}-${pkgver}.tar.gz::https://${pkgname}.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
-sha512sums=('8111b3f6f1a94319f5e146db6c184eb391c03ca554b20ea7227237afbc546a064898835ad16007333bb63aa725079046d413be11dfc3ecb76c77b6ac5096f7e9')
-
-build() {
- cd ${pkgname}-${pkgver}
- python2 setup.py build
-}
-
-check() {
- cd ${pkgname}-${pkgver}/test
- local PYTHONVERSION="$(python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
- PYTHONPATH="../build/lib.linux-${CARCH}-${PYTHONVERSION}" \
- python2 test_pyrit.py
-}
-
-package() {
- cd ${pkgname}-${pkgver}
- python2 setup.py install -O1 --root="${pkgdir}"
-}
-
-# vim: ts=2 sw=2 et:
Copied: pyrit/repos/community-i686/PKGBUILD (from rev 195535, pyrit/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2016-11-13 21:22:47 UTC (rev 195536)
@@ -0,0 +1,48 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Fabian Melters <melters [at] gmail [dot] com>
+
+pkgname=pyrit
+_pkgname=Pyrit
+pkgver=0.5.0
+pkgrel=1
+pkgdesc='The famous WPA precomputed cracker'
+url='https://github.com/JPaulMora/Pyrit'
+arch=('i686' 'x86_64')
+license=('GPL3')
+depends=('openssl' 'python2' 'zlib' 'libpcap')
+optdepends=(
+ 'cpyrit-cuda: nvidia gpu support'
+ 'cpyrit-opencl: opencl support'
+ 'scapy: packet capture analyzation support'
+ 'python2-sqlalchemy: storage support'
+)
+checkdepends=('python2-sqlalchemy' 'scapy')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/JPaulMora/Pyrit/archive/v${pkgver}.tar.gz
+ scapy-2.3.2.patch)
+sha512sums=('912742cd7d9cd9231b9b3aa155a5170c0ba36c3865280423e100c1d12df34e093ee56305d8738d4f406abbfef9b1d540872872b8ef23d699466298d41289ad25'
+ '99d4ae2159be2d829337f3481cbb6580da1c6a2d2b6b28c7ed17348daa983859b7cd6ba3ee8575cbcba16efa27bf230bac075599b1fa0b531178dbdc45f853b2')
+
+prepare() {
+ cd ${_pkgname}-${pkgver}
+ patch -p1 < "${srcdir}/scapy-2.3.2.patch"
+}
+
+build() {
+ cd ${_pkgname}-${pkgver}
+ python2 setup.py build
+}
+
+check() {
+ cd ${_pkgname}-${pkgver}/test
+ local PYTHONVERSION="$(python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+ PYTHONPATH="../build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+ python2 test_pyrit.py
+}
+
+package() {
+ cd ${_pkgname}-${pkgver}
+ python2 setup.py install -O1 --root="${pkgdir}" --skip-build
+ install -Dm 644 README.md CHANGELOG -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:
Copied: pyrit/repos/community-i686/scapy-2.3.2.patch (from rev 195535, pyrit/trunk/scapy-2.3.2.patch)
===================================================================
--- community-i686/scapy-2.3.2.patch (rev 0)
+++ community-i686/scapy-2.3.2.patch 2016-11-13 21:22:47 UTC (rev 195536)
@@ -0,0 +1,42 @@
+From 14ec997174b8e8fd20d22b6a97c57e19633f12a0 Mon Sep 17 00:00:00 2001
+From: Ilya Terentyev <bacondropped at gmail.com>
+Date: Tue, 1 Nov 2016 20:40:15 +0300
+Subject: [PATCH] update isinstance(EnumField) for scapy 2.3.3+
+
+scapy 2.3.2- requires that scapy.fields.EnumField is passed to
+isinstance, while scapy 2.3.3+ needs scapy.fields._EnumField.
+This patch accomodates pyrit for both versions.
+Fixes #500.
+---
+ cpyrit/pckttools.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/cpyrit/pckttools.py b/cpyrit/pckttools.py
+index 326829d..d58fff1 100644
+--- a/cpyrit/pckttools.py
++++ b/cpyrit/pckttools.py
+@@ -54,12 +54,23 @@
+ scapy.layers.dot11.PrismHeader)
+
+
++def isEnumField(f):
++ """Return True if f is an instance of EnumField. This function tries to be
++ portable: scapy versions 2.3.2 and earlier need isinstance(EnumField),
++ while scapy 2.3.3+ requires isinstance(_EnumField).
++ """
++ try:
++ return isinstance(f, scapy.fields._EnumField)
++ except AttributeError:
++ return isinstance(f, scapy.fields.EnumField)
++
++
+ def isFlagSet(self, name, value):
+ """Return True if the given field 'includes' the given value.
+ Exact behaviour of this function is specific to the field-type.
+ """
+ field, val = self.getfield_and_val(name)
+- if isinstance(field, scapy.fields.EnumField):
++ if isEnumField(field):
+ if val not in field.i2s:
+ return False
+ return field.i2s[val] == value
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2016-11-13 21:22:29 UTC (rev 195535)
+++ community-x86_64/PKGBUILD 2016-11-13 21:22:47 UTC (rev 195536)
@@ -1,39 +0,0 @@
-# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
-# Contributor: Fabian Melters <melters [at] gmail [dot] com>
-
-pkgname=pyrit
-pkgver=0.4.0
-pkgrel=3
-pkgdesc="WPA/WPA2-PSK attacking with gpu and cluster"
-url="https://code.google.com/p/pyrit"
-arch=('i686' 'x86_64')
-license=('GPL3')
-depends=('openssl' 'python2' 'zlib' 'libpcap')
-optdepends=(
- 'cpyrit-cuda: nvidia gpu support'
- 'cpyrit-opencl: opencl support'
- 'scapy: packet capture analyzation support'
- 'python2-sqlalchemy: storage support'
-)
-checkdepends=('python2-sqlalchemy' 'scapy')
-source=(${pkgname}-${pkgver}.tar.gz::https://${pkgname}.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
-sha512sums=('8111b3f6f1a94319f5e146db6c184eb391c03ca554b20ea7227237afbc546a064898835ad16007333bb63aa725079046d413be11dfc3ecb76c77b6ac5096f7e9')
-
-build() {
- cd ${pkgname}-${pkgver}
- python2 setup.py build
-}
-
-check() {
- cd ${pkgname}-${pkgver}/test
- local PYTHONVERSION="$(python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
- PYTHONPATH="../build/lib.linux-${CARCH}-${PYTHONVERSION}" \
- python2 test_pyrit.py
-}
-
-package() {
- cd ${pkgname}-${pkgver}
- python2 setup.py install -O1 --root="${pkgdir}"
-}
-
-# vim: ts=2 sw=2 et:
Copied: pyrit/repos/community-x86_64/PKGBUILD (from rev 195535, pyrit/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2016-11-13 21:22:47 UTC (rev 195536)
@@ -0,0 +1,48 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributor: Fabian Melters <melters [at] gmail [dot] com>
+
+pkgname=pyrit
+_pkgname=Pyrit
+pkgver=0.5.0
+pkgrel=1
+pkgdesc='The famous WPA precomputed cracker'
+url='https://github.com/JPaulMora/Pyrit'
+arch=('i686' 'x86_64')
+license=('GPL3')
+depends=('openssl' 'python2' 'zlib' 'libpcap')
+optdepends=(
+ 'cpyrit-cuda: nvidia gpu support'
+ 'cpyrit-opencl: opencl support'
+ 'scapy: packet capture analyzation support'
+ 'python2-sqlalchemy: storage support'
+)
+checkdepends=('python2-sqlalchemy' 'scapy')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/JPaulMora/Pyrit/archive/v${pkgver}.tar.gz
+ scapy-2.3.2.patch)
+sha512sums=('912742cd7d9cd9231b9b3aa155a5170c0ba36c3865280423e100c1d12df34e093ee56305d8738d4f406abbfef9b1d540872872b8ef23d699466298d41289ad25'
+ '99d4ae2159be2d829337f3481cbb6580da1c6a2d2b6b28c7ed17348daa983859b7cd6ba3ee8575cbcba16efa27bf230bac075599b1fa0b531178dbdc45f853b2')
+
+prepare() {
+ cd ${_pkgname}-${pkgver}
+ patch -p1 < "${srcdir}/scapy-2.3.2.patch"
+}
+
+build() {
+ cd ${_pkgname}-${pkgver}
+ python2 setup.py build
+}
+
+check() {
+ cd ${_pkgname}-${pkgver}/test
+ local PYTHONVERSION="$(python2 -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')"
+ PYTHONPATH="../build/lib.linux-${CARCH}-${PYTHONVERSION}" \
+ python2 test_pyrit.py
+}
+
+package() {
+ cd ${_pkgname}-${pkgver}
+ python2 setup.py install -O1 --root="${pkgdir}" --skip-build
+ install -Dm 644 README.md CHANGELOG -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
+
+# vim: ts=2 sw=2 et:
Copied: pyrit/repos/community-x86_64/scapy-2.3.2.patch (from rev 195535, pyrit/trunk/scapy-2.3.2.patch)
===================================================================
--- community-x86_64/scapy-2.3.2.patch (rev 0)
+++ community-x86_64/scapy-2.3.2.patch 2016-11-13 21:22:47 UTC (rev 195536)
@@ -0,0 +1,42 @@
+From 14ec997174b8e8fd20d22b6a97c57e19633f12a0 Mon Sep 17 00:00:00 2001
+From: Ilya Terentyev <bacondropped at gmail.com>
+Date: Tue, 1 Nov 2016 20:40:15 +0300
+Subject: [PATCH] update isinstance(EnumField) for scapy 2.3.3+
+
+scapy 2.3.2- requires that scapy.fields.EnumField is passed to
+isinstance, while scapy 2.3.3+ needs scapy.fields._EnumField.
+This patch accomodates pyrit for both versions.
+Fixes #500.
+---
+ cpyrit/pckttools.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/cpyrit/pckttools.py b/cpyrit/pckttools.py
+index 326829d..d58fff1 100644
+--- a/cpyrit/pckttools.py
++++ b/cpyrit/pckttools.py
+@@ -54,12 +54,23 @@
+ scapy.layers.dot11.PrismHeader)
+
+
++def isEnumField(f):
++ """Return True if f is an instance of EnumField. This function tries to be
++ portable: scapy versions 2.3.2 and earlier need isinstance(EnumField),
++ while scapy 2.3.3+ requires isinstance(_EnumField).
++ """
++ try:
++ return isinstance(f, scapy.fields._EnumField)
++ except AttributeError:
++ return isinstance(f, scapy.fields.EnumField)
++
++
+ def isFlagSet(self, name, value):
+ """Return True if the given field 'includes' the given value.
+ Exact behaviour of this function is specific to the field-type.
+ """
+ field, val = self.getfield_and_val(name)
+- if isinstance(field, scapy.fields.EnumField):
++ if isEnumField(field):
+ if val not in field.i2s:
+ return False
+ return field.i2s[val] == value
More information about the arch-commits
mailing list