File hydra.spec of Package hydra

#
# spec file for package hydra
#
# Copyright (c) 2025 SUSE LLC
#
# 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:           hydra
Version:        9.5
Release:        0
Summary:        A very fast network logon cracker which support many different services
License:        AGPL-3.0-only
Group:          Productivity/Networking/Diagnostic
URL:            https://github.com/vanhauser-thc/thc-hydra
Source0:        https://github.com/vanhauser-thc/thc-hydra/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  libapr-util1-devel
BuildRequires:  libapr1-devel
BuildRequires:  libecpg6
BuildRequires:  libgcrypt-devel
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gail)
BuildRequires:  pkgconfig(gdk-2.0)
BuildRequires:  pkgconfig(gdk-x11-2.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(gtk+-unix-print-2.0)
BuildRequires:  pkgconfig(gtk+-x11-2.0)
BuildRequires:  pkgconfig(libidn)
BuildRequires:  pkgconfig(libpq)
BuildRequires:  pkgconfig(libssh)
BuildRequires:  pkgconfig(libsvn_auth_gnome_keyring)
BuildRequires:  pkgconfig(libsvn_auth_kwallet)
BuildRequires:  pkgconfig(libsvn_client)
BuildRequires:  pkgconfig(libsvn_delta)
BuildRequires:  pkgconfig(libsvn_diff)
BuildRequires:  pkgconfig(libsvn_fs)
BuildRequires:  pkgconfig(libsvn_fs_base)
BuildRequires:  pkgconfig(libsvn_fs_fs)
BuildRequires:  pkgconfig(libsvn_fs_util)
BuildRequires:  pkgconfig(libsvn_fs_x)
BuildRequires:  pkgconfig(libsvn_ra)
BuildRequires:  pkgconfig(libsvn_ra_local)
BuildRequires:  pkgconfig(libsvn_ra_serf)
BuildRequires:  pkgconfig(libsvn_ra_svn)
BuildRequires:  pkgconfig(libsvn_repos)
BuildRequires:  pkgconfig(libsvn_subr)
BuildRequires:  pkgconfig(libsvn_wc)
BuildRequires:  pkgconfig(ncurses)
BuildRequires:  pkgconfig(smbclient)
%if 0%{?suse_version} >= 1510
BuildRequires:  freerdp2-devel
BuildRequires:  libmariadbd-devel
BuildRequires:  pkgconfig(libmemcached)
%else
BuildRequires:  mysql-devel
%endif
%if 0%{?suse_version} >= 1520 && 0%{?suse_version} < 1550
BuildRequires:  pkgconfig(fbclient)
%endif

%description
Number one of the biggest security holes are passwords, as every password
security study shows.
This tool is a proof of concept code, to give researchers and security
consultants the possiblity to show how easy it would be to gain unauthorized
access from remote to a system.

THIS TOOL IS FOR LEGAL PURPOSES ONLY!

There are already several login hacker tools available, however none does
either support more than one protocol to attack or support parallized
connects.

%prep
%setup -q -n thc-%{name}-%{version}

%build
%configure --fhs DATADIR=/share/hydra

%make_build
cd hydra-gtk
%configure
%make_build
cd ..

%install
%make_install MANDIR=/share/man/man1/ DATADIR=/share/hydra
cd hydra-gtk
%make_install MANDIR=/share/man/man1/ DATADIR=/share/hydra
%fdupes -s %{buildroot}/%{_mandir}
%fdupes %{buildroot}/%{_prefix}

%files
%defattr(660,root,root)
%attr(750, -, -) %{_bindir}/%{name}
%attr(750, -, -) %{_bindir}/xhydra
%attr(750, -, -) %{_bindir}/%{name}-wizard.sh
%attr(750, -, -) %{_bindir}/pw-inspector
%attr(750, -, -) %{_bindir}/dpl4hydra.sh
%attr(644, -, -) %{_mandir}/man1/hydra.1.gz
%attr(644, -, -) %{_mandir}/man1/pw-inspector.1.gz
%attr(644, -, -) %{_mandir}/man1/xhydra.1.gz
%attr(750, -, -) %{_datarootdir}/%{name}
%attr(640, -, -) %{_datarootdir}/%{name}/dpl4hydra_full.csv
%attr(640, -, -) %{_datarootdir}/%{name}/dpl4hydra_local.csv
%attr(640, -, -) %{_datarootdir}/pixmaps/xhydra.png
%attr(640, -, -) %doc README LICENSE CHANGES LICENSE_OPENSSL TODO

%changelog
openSUSE Build Service is sponsored by