File reaver.spec of Package reaver
#
# spec file for package reaver
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2013 Sidlovsky, Yaroslav <zawertun@gmail.com>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: reaver
Version: 1.6.6
Release: 0
Summary: Brute force attack against WPS
License: GPL-2.0-or-later
Group: Productivity/Networking/Diagnostic
# was https://code.google.com/p/reaver-wps/
URL: https://github.com/t6x/reaver-wps-fork-t6x
Source0: https://github.com/t6x/reaver-wps-fork-t6x/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
# PATCH-FEATURE-OPENSUSE reaver-lwe-unbundle.patch
Patch0: reaver-lwe-unbundle.patch
BuildRequires: libiw-devel
BuildRequires: libpcap-devel
BuildRequires: sqlite3-devel
%description
Reaver implements a brute force attack against Wifi Protected Setup (WPS)
registrar PINs in order to recover WPA/WPA2 passphrases, as described in
http://sviehb.files.wordpress.com/2011/12/viehboeck_wps.pdf.
Reaver has been designed to be a robust and practical attack against WPS,
and has been tested against a wide variety of access points and WPS
implementations.
%prep
%setup -q -n %{name}-wps-fork-t6x-%{version}
%patch0 -p1
# Remove executable mode from sources
find . -type f -perm /111 -regex ".*\.[ch]" -exec chmod a-x {} \;
# Unbundle wireless-tools
rm -rf src/lwe
%build
pushd src
%configure
%make_build
popd
%install
pushd src
%make_install
popd
install -D -m 0644 docs/reaver.1 %{buildroot}%{_mandir}/man1/reaver.1
mkdir -pv %{buildroot}%{_localstatedir}/lib/%{name}
touch %{buildroot}%{_localstatedir}/lib/%{name}/reaver.db
%files
%doc docs/README docs/README.REAVER docs/README.WASH
%{_bindir}/reaver
%{_bindir}/wash
%dir %{_localstatedir}/lib/%{name}
%ghost %{_localstatedir}/lib/%{name}/reaver.db
%{_mandir}/man1/reaver.1%{?ext_man}
%changelog