summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 09:11:08 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 09:11:08 +0000
commitf0329447f2a92048b947211f4216ae32841c5d86 (patch)
tree7982f8419ee8bce917e622985f5f416bcce93209
parent0d2d3e34dfc230e5a50a91463f7eb783f2f64452 (diff)
automatic import of python-passivetotalopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-passivetotal.spec485
-rw-r--r--sources1
3 files changed, 487 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..ad818af 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/passivetotal-2.5.9.tar.gz
diff --git a/python-passivetotal.spec b/python-passivetotal.spec
new file mode 100644
index 0000000..272b11c
--- /dev/null
+++ b/python-passivetotal.spec
@@ -0,0 +1,485 @@
+%global _empty_manifest_terminate_build 0
+Name: python-passivetotal
+Version: 2.5.9
+Release: 1
+Summary: Library for the RiskIQ PassiveTotal and Illuminate API
+License: GPLv2
+URL: https://github.com/passivetotal/python_api
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/96/d1/c38b3b94a4ea1d0339848296095c13dab10857aebc88d201278123efbc4c/passivetotal-2.5.9.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-dateutil
+Requires: python3-future
+Requires: python3-tldextract
+Requires: python3-pandas
+
+%description
+# RiskIQ PassiveTotal Python Library
+
+## Build Status
+[![build status](https://travis-ci.org/passivetotal/python_api.svg)](https://travis-ci.org/passivetotal/python_api)
+[![doc status](https://readthedocs.org/projects/passivetotal/badge/?version=latest)](https://readthedocs.org/projects/passivetotal/?badge=latest)
+[![pypi downloads](https://img.shields.io/pypi/dm/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal/)
+[![pypi version](https://img.shields.io/pypi/v/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal)
+[![license](https://img.shields.io/pypi/l/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal/)
+
+## Introduction
+
+This Python library provides an interface to the RiskIQ PassiveTotal Internet
+intelligence database and the RiskIQ Illuminate Reputation Score.
+
+Security researchers and network defenders use RiskIQ PassiveTotal to map threat
+actor infrastructure, profile hostnames & IP addresses, discover web technologies
+on Internet hosts.
+
+Capabilites of this library include:
+* Credential management - protect API keys from accidental disclosure
+* Object analyzer - analyze hosts without knowing which API endpoints to use
+* CLI for quick queries and package configuration
+* Low-level wrappers for all PassiveTotal API endpoints
+
+To learn more about RiskIQ and start a free trial, visit [https://community.riskiq.com](https://community.riskiq.com)
+
+## Getting Started
+
+### Install the PassiveTotal Library
+The PassiveTotal Python library is available in pip under the package name `passivetotal`.
+Consider setting up a [virtual environment](https://docs.python.org/3/library/venv.html), then run:
+```
+pip install passivetotal
+```
+
+### Obtain API Keys
+Queries to the API must be authenticated with a PassiveTotal API key.
+
+1. Log in (or sign up) at [community.riskiq.com](https://community.riskiq.com)
+2. Access your profile by clicking the person icon in the upper-right corner of the page.
+3. Click on "Account Settings"
+4. Under "API Access", click "Show" to reveal your API credentials.
+
+The identifier for your API account is alternatively called a "username", a "user", or
+an "API key". Look for an email address and use that value when prompted for your
+"API username".
+
+The "API Secret" is a long string of characters that should be kept secure. It is
+the primary authentication method for your API account.
+
+Your PassiveTotal account may have a separate "API Secret" for your organization - when
+available, **always use your organization key** unless you have a specific reason not to.
+
+
+### Build a Config File
+The optimal way to store your API credentials is inside a config file managed by
+this library's command line tools.
+
+The library references the config file by default when creating new API connections,
+setting up the analyzer module, or running command line tools.
+
+Run the command setup command with your username to get started:
+```
+pt-config setup user@example.com
+```
+
+Enter the API secret key when prompted, then press enter. The complete configuration
+will then print out so you can confirm the values.
+
+To see other configuration options, including options for an HTTP proxy, enter:
+```
+pt-config setup -h
+```
+
+
+### Choose an Interface
+This library enables interaction with the PassiveTotal API through several distinct
+interfaces. Choose the one that best fits your use case.
+
+*If you're not sure where to start, use the Object Analyzer.*
+
+### Object Analyzer
+```python
+>>> from passivetotal import analyzer
+>>> analyzer.init()
+>>> age = analyzer.Hostname('riskiq.com').whois.age
+>>> print('Domain is {} days old'.format(age))
+Domain is 5548 days old
+>>> analyzer.set_date_range(days_back=30)
+>>> pdns = analyzer.Hostname('api.passivetotal.org').ip.resolutions
+>>> for record in pdns.sorted_by('lastseen'):
+ print(record)
+A "staging-api.passivetotal.org" [ 465 days] (2019-12-11 to 2021-03-21)
+A "api.passivetotal.org" [ 459 days] (2019-12-18 to 2021-03-22)
+```
+**Benefits**
+* Ideal starting point for new scripts and product integrations.
+* Works well in interactive Python environments such as Jupyter.
+* Does not require familiarity with specific API endpoints.
+* Stores results within object instances to faciliate declarative interactions
+ and offer an intuitive syntax.
+
+**Caveats**
+* May not have complete coverage for every API endpoint.
+* Opinionated: default values are optimized for efficient queries and
+ common investigative pathways.
+* API queries run automatically when properties are first accessed,
+ which may result in excessive API query usage.
+
+
+### Command Line
+Access the CLI with the `pt-client` command. Run the command without options to
+see a list of available commands.
+
+Most CLI commands only output JSON; if you need more robust output options,
+consider writing a script with the `analyzer` module.
+
+
+### Request Wrappers
+Use these low-level interfaces when you know exactly which API endpoints you need
+to query and what parameters they require. These are still preferred over making
+API requests directly with `requests` or `urllib` because they benefit from
+the credential management and config file mechanism described above.
+
+Wrappers should exist for every PassiveTotal API endpoint, but availability may
+lag behind when new features are implemented. If you cannot locate a wrapper for
+your preferred endpoint, use an instance of the `passivetotal.GenericRequest` class.
+
+
+## Additional Resources
+
+Library docs: https://passivetotal.readthedocs.io/
+
+RiskIQ Product Support: https://info.riskiq.net/
+
+
+
+
+%package -n python3-passivetotal
+Summary: Library for the RiskIQ PassiveTotal and Illuminate API
+Provides: python-passivetotal
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-passivetotal
+# RiskIQ PassiveTotal Python Library
+
+## Build Status
+[![build status](https://travis-ci.org/passivetotal/python_api.svg)](https://travis-ci.org/passivetotal/python_api)
+[![doc status](https://readthedocs.org/projects/passivetotal/badge/?version=latest)](https://readthedocs.org/projects/passivetotal/?badge=latest)
+[![pypi downloads](https://img.shields.io/pypi/dm/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal/)
+[![pypi version](https://img.shields.io/pypi/v/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal)
+[![license](https://img.shields.io/pypi/l/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal/)
+
+## Introduction
+
+This Python library provides an interface to the RiskIQ PassiveTotal Internet
+intelligence database and the RiskIQ Illuminate Reputation Score.
+
+Security researchers and network defenders use RiskIQ PassiveTotal to map threat
+actor infrastructure, profile hostnames & IP addresses, discover web technologies
+on Internet hosts.
+
+Capabilites of this library include:
+* Credential management - protect API keys from accidental disclosure
+* Object analyzer - analyze hosts without knowing which API endpoints to use
+* CLI for quick queries and package configuration
+* Low-level wrappers for all PassiveTotal API endpoints
+
+To learn more about RiskIQ and start a free trial, visit [https://community.riskiq.com](https://community.riskiq.com)
+
+## Getting Started
+
+### Install the PassiveTotal Library
+The PassiveTotal Python library is available in pip under the package name `passivetotal`.
+Consider setting up a [virtual environment](https://docs.python.org/3/library/venv.html), then run:
+```
+pip install passivetotal
+```
+
+### Obtain API Keys
+Queries to the API must be authenticated with a PassiveTotal API key.
+
+1. Log in (or sign up) at [community.riskiq.com](https://community.riskiq.com)
+2. Access your profile by clicking the person icon in the upper-right corner of the page.
+3. Click on "Account Settings"
+4. Under "API Access", click "Show" to reveal your API credentials.
+
+The identifier for your API account is alternatively called a "username", a "user", or
+an "API key". Look for an email address and use that value when prompted for your
+"API username".
+
+The "API Secret" is a long string of characters that should be kept secure. It is
+the primary authentication method for your API account.
+
+Your PassiveTotal account may have a separate "API Secret" for your organization - when
+available, **always use your organization key** unless you have a specific reason not to.
+
+
+### Build a Config File
+The optimal way to store your API credentials is inside a config file managed by
+this library's command line tools.
+
+The library references the config file by default when creating new API connections,
+setting up the analyzer module, or running command line tools.
+
+Run the command setup command with your username to get started:
+```
+pt-config setup user@example.com
+```
+
+Enter the API secret key when prompted, then press enter. The complete configuration
+will then print out so you can confirm the values.
+
+To see other configuration options, including options for an HTTP proxy, enter:
+```
+pt-config setup -h
+```
+
+
+### Choose an Interface
+This library enables interaction with the PassiveTotal API through several distinct
+interfaces. Choose the one that best fits your use case.
+
+*If you're not sure where to start, use the Object Analyzer.*
+
+### Object Analyzer
+```python
+>>> from passivetotal import analyzer
+>>> analyzer.init()
+>>> age = analyzer.Hostname('riskiq.com').whois.age
+>>> print('Domain is {} days old'.format(age))
+Domain is 5548 days old
+>>> analyzer.set_date_range(days_back=30)
+>>> pdns = analyzer.Hostname('api.passivetotal.org').ip.resolutions
+>>> for record in pdns.sorted_by('lastseen'):
+ print(record)
+A "staging-api.passivetotal.org" [ 465 days] (2019-12-11 to 2021-03-21)
+A "api.passivetotal.org" [ 459 days] (2019-12-18 to 2021-03-22)
+```
+**Benefits**
+* Ideal starting point for new scripts and product integrations.
+* Works well in interactive Python environments such as Jupyter.
+* Does not require familiarity with specific API endpoints.
+* Stores results within object instances to faciliate declarative interactions
+ and offer an intuitive syntax.
+
+**Caveats**
+* May not have complete coverage for every API endpoint.
+* Opinionated: default values are optimized for efficient queries and
+ common investigative pathways.
+* API queries run automatically when properties are first accessed,
+ which may result in excessive API query usage.
+
+
+### Command Line
+Access the CLI with the `pt-client` command. Run the command without options to
+see a list of available commands.
+
+Most CLI commands only output JSON; if you need more robust output options,
+consider writing a script with the `analyzer` module.
+
+
+### Request Wrappers
+Use these low-level interfaces when you know exactly which API endpoints you need
+to query and what parameters they require. These are still preferred over making
+API requests directly with `requests` or `urllib` because they benefit from
+the credential management and config file mechanism described above.
+
+Wrappers should exist for every PassiveTotal API endpoint, but availability may
+lag behind when new features are implemented. If you cannot locate a wrapper for
+your preferred endpoint, use an instance of the `passivetotal.GenericRequest` class.
+
+
+## Additional Resources
+
+Library docs: https://passivetotal.readthedocs.io/
+
+RiskIQ Product Support: https://info.riskiq.net/
+
+
+
+
+%package help
+Summary: Development documents and examples for passivetotal
+Provides: python3-passivetotal-doc
+%description help
+# RiskIQ PassiveTotal Python Library
+
+## Build Status
+[![build status](https://travis-ci.org/passivetotal/python_api.svg)](https://travis-ci.org/passivetotal/python_api)
+[![doc status](https://readthedocs.org/projects/passivetotal/badge/?version=latest)](https://readthedocs.org/projects/passivetotal/?badge=latest)
+[![pypi downloads](https://img.shields.io/pypi/dm/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal/)
+[![pypi version](https://img.shields.io/pypi/v/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal)
+[![license](https://img.shields.io/pypi/l/passivetotal.svg)](https://pypi.python.org/pypi/passivetotal/)
+
+## Introduction
+
+This Python library provides an interface to the RiskIQ PassiveTotal Internet
+intelligence database and the RiskIQ Illuminate Reputation Score.
+
+Security researchers and network defenders use RiskIQ PassiveTotal to map threat
+actor infrastructure, profile hostnames & IP addresses, discover web technologies
+on Internet hosts.
+
+Capabilites of this library include:
+* Credential management - protect API keys from accidental disclosure
+* Object analyzer - analyze hosts without knowing which API endpoints to use
+* CLI for quick queries and package configuration
+* Low-level wrappers for all PassiveTotal API endpoints
+
+To learn more about RiskIQ and start a free trial, visit [https://community.riskiq.com](https://community.riskiq.com)
+
+## Getting Started
+
+### Install the PassiveTotal Library
+The PassiveTotal Python library is available in pip under the package name `passivetotal`.
+Consider setting up a [virtual environment](https://docs.python.org/3/library/venv.html), then run:
+```
+pip install passivetotal
+```
+
+### Obtain API Keys
+Queries to the API must be authenticated with a PassiveTotal API key.
+
+1. Log in (or sign up) at [community.riskiq.com](https://community.riskiq.com)
+2. Access your profile by clicking the person icon in the upper-right corner of the page.
+3. Click on "Account Settings"
+4. Under "API Access", click "Show" to reveal your API credentials.
+
+The identifier for your API account is alternatively called a "username", a "user", or
+an "API key". Look for an email address and use that value when prompted for your
+"API username".
+
+The "API Secret" is a long string of characters that should be kept secure. It is
+the primary authentication method for your API account.
+
+Your PassiveTotal account may have a separate "API Secret" for your organization - when
+available, **always use your organization key** unless you have a specific reason not to.
+
+
+### Build a Config File
+The optimal way to store your API credentials is inside a config file managed by
+this library's command line tools.
+
+The library references the config file by default when creating new API connections,
+setting up the analyzer module, or running command line tools.
+
+Run the command setup command with your username to get started:
+```
+pt-config setup user@example.com
+```
+
+Enter the API secret key when prompted, then press enter. The complete configuration
+will then print out so you can confirm the values.
+
+To see other configuration options, including options for an HTTP proxy, enter:
+```
+pt-config setup -h
+```
+
+
+### Choose an Interface
+This library enables interaction with the PassiveTotal API through several distinct
+interfaces. Choose the one that best fits your use case.
+
+*If you're not sure where to start, use the Object Analyzer.*
+
+### Object Analyzer
+```python
+>>> from passivetotal import analyzer
+>>> analyzer.init()
+>>> age = analyzer.Hostname('riskiq.com').whois.age
+>>> print('Domain is {} days old'.format(age))
+Domain is 5548 days old
+>>> analyzer.set_date_range(days_back=30)
+>>> pdns = analyzer.Hostname('api.passivetotal.org').ip.resolutions
+>>> for record in pdns.sorted_by('lastseen'):
+ print(record)
+A "staging-api.passivetotal.org" [ 465 days] (2019-12-11 to 2021-03-21)
+A "api.passivetotal.org" [ 459 days] (2019-12-18 to 2021-03-22)
+```
+**Benefits**
+* Ideal starting point for new scripts and product integrations.
+* Works well in interactive Python environments such as Jupyter.
+* Does not require familiarity with specific API endpoints.
+* Stores results within object instances to faciliate declarative interactions
+ and offer an intuitive syntax.
+
+**Caveats**
+* May not have complete coverage for every API endpoint.
+* Opinionated: default values are optimized for efficient queries and
+ common investigative pathways.
+* API queries run automatically when properties are first accessed,
+ which may result in excessive API query usage.
+
+
+### Command Line
+Access the CLI with the `pt-client` command. Run the command without options to
+see a list of available commands.
+
+Most CLI commands only output JSON; if you need more robust output options,
+consider writing a script with the `analyzer` module.
+
+
+### Request Wrappers
+Use these low-level interfaces when you know exactly which API endpoints you need
+to query and what parameters they require. These are still preferred over making
+API requests directly with `requests` or `urllib` because they benefit from
+the credential management and config file mechanism described above.
+
+Wrappers should exist for every PassiveTotal API endpoint, but availability may
+lag behind when new features are implemented. If you cannot locate a wrapper for
+your preferred endpoint, use an instance of the `passivetotal.GenericRequest` class.
+
+
+## Additional Resources
+
+Library docs: https://passivetotal.readthedocs.io/
+
+RiskIQ Product Support: https://info.riskiq.net/
+
+
+
+
+%prep
+%autosetup -n passivetotal-2.5.9
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-passivetotal -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 2.5.9-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..f963806
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+28d6163eb97da7edf8797943035f4d9a passivetotal-2.5.9.tar.gz