- Enhancements:
- Removed strict checking on tracker type to permit querying by arbitrary tracker types. Updated list
of common trackers. Added searchType param to docs to reflect API's capability of returning either
hostnames or addresses.
- New methods to search trackers in the `analyzer` module, including `tracker_references` property on
`Hostname` and `IPAddress` objects to find other sites referencing the focus host in their tracker
values.
- New `analyzer.Tracker` top-level entity with `observations_by_ip` and `observations_by_hostname`
properties to find other hosts with the same tracker type and value.
- New `filter_fn` method on all RecordList objects enables filtering a list by an arbitrary function.
Helps reduce code duplication and enables more advanced filtering.
- Monitoring API endpoint support in the core library, and new `alerts` property on
project artifacts to easily retrieve the list of new alerts for an artifact in a project.
Handles pagination automatically and returns results in new analyzer objects to enable
standard filtering and data representation (i.e. `as_dict` and `as_df`).
- Small change to the `get_object` method to tolerate passing it objects that are already
`analyzer.Hostname` or `analyzer.IPAddress` objects.
- New `is_ip` and `is_hostname` methods on both `Hostname` and `IPAddress` objects to simplify
code that operates against a list of hosts that may include objects of both types.
- New methods on Tracker search results and Hostpair results to exclude records with hostnames,
domains or tlds in a given list. This helps refine results to focus on "foreign" sites and enables direct
application of proven phishing site detection use cases.
- Bug Fixes:
- Fixed incorrect constant reference in trackers API (by removing strict checking on
tracker type).
- Fixed broken `age` property on Articles that was also causing `as_df` and `as_dict` to fail.
Likely caused by missing time zone info in dates returned from the API.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-passivetotal?expand=0&rev=21
95 lines
3.1 KiB
RPMSpec
95 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-passivetotal
|
|
#
|
|
# Copyright (c) 2021 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/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%bcond_without test
|
|
Name: python-passivetotal
|
|
Version: 2.5.4
|
|
Release: 0
|
|
Summary: Client for the PassiveTotal REST API
|
|
License: GPL-2.0-only
|
|
Group: Development/Languages/Python
|
|
URL: https://passivetotal.readthedocs.org
|
|
Source: https://files.pythonhosted.org/packages/source/p/passivetotal/passivetotal-%{version}.tar.gz
|
|
Source1: https://github.com/passivetotal/python_api/raw/c2d0c8f4ea3dde4caec01f5401fb6f105f8a2447/LICENSE
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-ez_setup
|
|
Requires: python-future
|
|
Requires: python-python-dateutil
|
|
Requires: python-requests
|
|
Requires: python-tldextract
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
BuildArch: noarch
|
|
%if %{with test}
|
|
BuildRequires: %{python_module ez_setup}
|
|
BuildRequires: %{python_module future}
|
|
BuildRequires: %{python_module python-dateutil}
|
|
BuildRequires: %{python_module requests}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%description
|
|
Passivetotal provides a Python client library implementation into RiskIQ API
|
|
services. The library currently provides support for the following services:
|
|
|
|
- Passive DNS queries and filters
|
|
- WHOIS queries (search and details)
|
|
- SSL Certificates (search and details)
|
|
- Account configuration
|
|
- Site actions (tagging, classifying, etc.)
|
|
|
|
%prep
|
|
%setup -q -n passivetotal-%{version}
|
|
sed -i '1s/^#!.*//' passivetotal/*.py passivetotal/*/*.py
|
|
cp %{SOURCE1} .
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand rm -r %{buildroot}%{$python_sitelib}/tests
|
|
%python_clone -a %{buildroot}%{_bindir}/pt-client
|
|
%python_clone -a %{buildroot}%{_bindir}/pt-config
|
|
%python_clone -a %{buildroot}%{_bindir}/pt-info
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%post
|
|
%python_install_alternative pt-client
|
|
%python_install_alternative pt-config
|
|
%python_install_alternative pt-info
|
|
|
|
%postun
|
|
%python_uninstall_alternative pt-client
|
|
%python_uninstall_alternative pt-config
|
|
%python_uninstall_alternative pt-info
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/pt-info
|
|
%python_alternative %{_bindir}/pt-config
|
|
%python_alternative %{_bindir}/pt-client
|
|
%{python_sitelib}/passivetotal-*.egg-info
|
|
%{python_sitelib}/passivetotal/
|
|
|
|
%changelog
|