File whatweb.spec of Package whatweb

#
# spec file for package whatweb
#
# Copyright (c) 2022 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/
#


%define _libdir %{_prefix}/lib

Name:           whatweb
Version:        0.5.5
Release:        0
Summary:        Web Scanner
License:        GPL-2.0-or-later
Group:          Productivity/Networking/Security
Source:         https://github.com/urbanadventurer/WhatWeb/archive/refs/tags/v%{version}.tar.gz
Source99:       %{name}-rpmlintrc
Patch0:         whatweb.patch
URL:            https://www.morningstarsecurity.com/research/whatweb
BuildRequires:  make
BuildRequires:  ruby
Requires:       rubygem(%{rb_default_ruby_abi}:addressable)
Requires:       rubygem(%{rb_default_ruby_abi}:bundler)
Requires:       rubygem(%{rb_default_ruby_abi}:json)
Requires:       rubygem(%{rb_default_ruby_abi}:public_suffix:3.1)
BuildArch:      noarch

%description
WhatWeb identifies websites. Its goal is to answer the question, "What is that Website?". WhatWeb recognises web technologies including content management systems (CMS), blogging platforms, statistic/analytics packages, JavaScript libraries, web servers, and embedded devices. WhatWeb has over 1800 plugins, each to recognise something different. WhatWeb also identifies version numbers, email addresses, account IDs, web framework modules, SQL errors, and more.

WhatWeb can be stealthy and fast, or thorough but slow. WhatWeb supports an aggression level to control the trade off between speed and reliability. When you visit a website in your browser, the transaction includes many hints of what web technologies are powering that website. Sometimes a single webpage visit contains enough information to identify a website but when it does not, WhatWeb can interrogate the website further. The default level of aggression, called 'stealthy', is the fastest and requires only one HTTP request of a website. This is suitable for scanning public websites. More aggressive modes were developed for use in penetration tests.

Most WhatWeb plugins are thorough and recognise a range of cues from subtle to obvious. For example, most WordPress websites can be identified by the meta HTML tag, e.g. '', but a minority of WordPress websites remove this identifying tag but this does not thwart WhatWeb. The WordPress WhatWeb plugin has over 15 tests, which include checking the favicon, default installation files, login pages, and checking for "/wp-content/" within relative links.

%prep
%setup -q -n WhatWeb-%version
%patch0 -p1
%__sed -i 's/\r$//' README.md

%build

%install
%__make \
	 PREFIX="%{_prefix}" \
	 BINPATH="%{_bindir}" \
	 LIBPATH="%{_libdir}" \
	 MANPATH="%{_mandir}" \
	 DOCPATH="%{_defaultdocdir}" \
	 DESTDIR="%{buildroot}" \
	 install

%files
%doc %{_defaultdocdir}/%{name}
%license LICENSE
%{_bindir}/whatweb
%{_libdir}/whatweb
%{_mandir}/man1/whatweb.1%{ext_man}

# vim: set sw=3 ts=3 noet:
# Local Variables:
# mode: rpm-spec
# tab-width: 3
# End:

%changelog
openSUSE Build Service is sponsored by