# Maintainer: Levente Polyak <levente[at]leventepolyak[dot]net>
# Contributor: Fabiano Furtado < fusca14 (at) gmail (dot) com >

pkgname=wifite
pkgver=2.5.8
pkgrel=1
epoch=2
pkgdesc='Tool to attack multiple WEP and WPA encrypted networks at the same time'
url='https://github.com/kimocoder/wifite2'
arch=('any')
license=('GPL2')
depends=('python' 'aircrack-ng' 'iproute2' 'iw')
makedepends=('python-setuptools')
optdepends=(
  'wireshark-cli: detecting WPS networks and inspecting handshake capture files'
  'reaver: WPS Pixie-Dust & brute-force attacks'
  'bully: WPS Pixie-Dust & brute-force attacks'
  'cowpatty: detect WPA handshakes'
  'pyrit: detect WPA handshakes'
  'macchanger: change MAC for attacks'
  'hashcat: cracking PMKID hashes'
  'hcxdumptool: capturing PMKID hashes'
  'hcxpcapngtool: converting PMKID packet captures into hashcat format'
)
provides=(wifite2)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('60696146c63febe09b75c962cd27b0b50ae2d5ee8674c6e5a619eb699a41b9c8093973561fcadc1a94a660929532319af918521941cafdf83fcba3b8c6bf8d8f')
b2sums=('cc6df4b0d65597aed811664f16cafbb53755573c0ce6c530865debfc20e0ae3843fd15a266dd90f98eb25a952d6221c5a74d7efa54527a87e41163e1b36bad4e')

prepare() {
  cd ${pkgname}2-${pkgver}
  sed 's|sbin|bin|g' -i setup.cfg
}

build() {
  cd ${pkgname}2-${pkgver}
  python setup.py build
}

package() {
  cd ${pkgname}2-${pkgver}
  python setup.py install --root="${pkgdir}" -O1 --skip-build
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
