Skip to content

Commit 9cb234c

Browse files
authored
Merge pull request #34 from passivetotal/illuminate-asi-cti
Illuminate ASI and CTI
2 parents 61de4dd + 3af777e commit 9cb234c

File tree

14 files changed

+1600
-35
lines changed

14 files changed

+1600
-35
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# Changelog
22

3+
## v2.5.1
4+
5+
#### Enhancements
6+
7+
- Adds support for the Illuminate CTI module with Intel Profile API library
8+
calls and `analzyer` objects. Includes support for all API parameters and
9+
handles pagination automatically.
10+
- Adds support for Illuminate Attack Surface Intelligence including third-party
11+
attack surfaces.
12+
- Ability to filter all RecordList analyzer objects by a list of values using
13+
new `filter_in` method.
14+
- Ability to filter all RecordList analyzer objects by a case-insensitive
15+
substring search using new `filter_substring` method. Especially useful for
16+
filtering a list of Attack Surface Insights or Attack Surface Third-Party vendors.
17+
18+
19+
20+
#### Bug Fixes
21+
22+
- Filter methods on RecordList objects now consistently return lists instead of
23+
filters.
24+
- Property return NotImplemented type for base methods.
25+
- Ensure strings are returned for firstseen / lastseen dates in certificates
26+
property. Was causing json encoding errors when trying to encode
27+
`certificates.as_dict`.
28+
- Add missing `duration` property to pDNS `resolutions.as_dict`
29+
- Fixed save_to_project() API call; was broken after introduction of new API
30+
exception types.
31+
32+
33+
34+
335
## v2.5.0
436

537
#### Enhancements:

docs/analyzer.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,54 @@ IP or hostname.
193193
:members:
194194
:inherited-members:
195195
196+
197+
Pandas Integration
198+
------------------
199+
200+
The `analyzer` module contains an optional integration with the Pandas_ Python
201+
library. `pandas` is a robust data analytics toolset that integrates especially
202+
well with Jupyter Notebooks. Even if you don't plan to use the more sophisticated
203+
features `pandas` offers, the vastly improved display of `analyzer` results in
204+
notebooks is well worth enabling the integration.
205+
206+
To get started, install the `pandas` Python package, ideally in a
207+
`virtual environment <https://docs.python.org/3/library/venv.html>`_:
208+
209+
``pip install pandas``
210+
211+
Nearly all `analyzer` objects offer results formatted as a Pandas `DataFrame`,
212+
which is the standard two-dimensional (tabluar) data format in Pandas. You can access
213+
the data with the `as_df` property or by calling the `to_dataframe()` method on an
214+
analyzer object. For example:
215+
216+
``analyzer.Hostname('riskiq.net').summary.as_df``
217+
218+
If this is the last line of a cell in a Jupyter notebook, and you run that
219+
cell, you'll get a one-line tabular output with the summary data in columns.
220+
221+
To view a list of pDNS records:
222+
223+
``analyzer.Hostname('riskiq.net').resolutions.as_df``
224+
225+
Internally, the `as_df` property calls `to_dataframe()` on each object with
226+
no parameters, which results in a default rendering of the dataframe. Some objects,
227+
like :class:`passivetotal.analyzer.illuminate.ReputationScore`, offer additional options
228+
in their implementation of `to_dataframe()`. For example:
229+
``analyzer.Hostname('jquery.su').reputation.to_dataframe(explode_rules=True)``
230+
231+
This will show the reputation score with one row for each rule returned by the
232+
Reputation API. It uses the pandas `DataFrame.explode` method to unstack a list into
233+
a set of rows and columns, hence the parameter name `explode_rules`.
234+
235+
Pandas dataframes are easily exported as CSV and offer capabilities to perform
236+
SQL-style joins and Excel-style VLOOKUPs. Consult the docs to learn what's possible.
237+
238+
239+
.. _Pandas: https://pandas.pydata.org/docs/index.html
240+
241+
242+
243+
196244
Using Record Lists
197245
------------------
198246
Several attributes of Hostnames and IPs return lists of records from the API. The

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
# built documents.
6161
#
6262
# The short X.Y version.
63-
version = '2.4'
63+
version = '2.5'
6464
# The full version, including alpha/beta/rc tags.
65-
release = '2.4.2'
65+
release = '2.5.1'
6666

6767
# The language for content autogenerated by Sphinx. Refer to documentation
6868
# for a list of supported languages.

0 commit comments

Comments
 (0)