Bad Reputation (Blacklisted IP) Incident Reporting.
Project description
Daily Blacklisted IP Reporting
Document Bad Reputation incidents in GuardiCore Centra (GC).
Howto
Primary use cases of the BlacklistReport package are displayed in main.py.
main.py shows, through use of environment variables SAVE_HTML and SAVE_PLAINTEXT,
the following use cases:
- Save an html report to an html file.
- Save a plaintext report to a text file.
BlacklistReport.generate_blacklist_report
generate_blacklist_reportgenerates a blacklisted IP report in both html and plaintext formats.- Omitting use cases in which intermediate data must be collected,
generate_blacklist_reportis the only function call required to generate a blacklist report.
Classes
BlacklistReportis responsible for high-level data collection & formatting.BlacklistEntrydefines the outline for entries in a blacklist report.IpEntryinner class ofBlacklistEntry; defines the structure of IP entries.ThreatDatasingleton-esque class for fetching threat intel summaries.
BlacklistReport
- Initialization: Instantiating a
BlacklistReportobject requires an authenticated Centra instance. fetch_customer_labelretrieves the GC label corresponding to a given customer.fetch_incidentsretrieves all Bad Reputation incidents from an authenticated Centra instance.build_reportinstantiates aBlacklistEntryobject for each incident retrieved infetch_incidents.build_report_strcreates a string (HTML or plaintext) representation of a `BlacklistReport' object.
BlacklistEntry
- Note: Besides the
src,destinations, andportsproperties, all properties ofBlacklistEntryare READ-ONLY add_destinationappends destination ip addresses to aBlacklistEntryobject's (unique) destination list.add_portsappends destination ports to aBlacklistEntryobject's (unique) port list.
IpEntry
- Note:
IpEntryis an inner class ofBlacklistEntry. Furthermore, all properties ofIpEntryare READ-ONLY
ThreatData
- Note: This class has no constructor, and has a single class variable:
OPSWAT_KEY set_opswat_keysets the class variableOPSWAT_KEYto the provided key
Logging
- A default logging configuration has been defined in
BlacklistReport.__init__.py. - By default, log messages are recorded in a top-level file called
dailyblacklistreporting.log.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file BlacklistReport-0.3.0.tar.gz.
File metadata
- Download URL: BlacklistReport-0.3.0.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb3bdc7d02a57482802aebf603c2b38040ad1496a6453532fd3e46ba835cb255
|
|
| MD5 |
e56716c8710dc8ab0be014798fdd77f8
|
|
| BLAKE2b-256 |
e34dec1e41915bf04311ccc783af54d47904513e08d283cee4e906f5c82f324f
|
File details
Details for the file BlacklistReport-0.3.0-py3-none-any.whl.
File metadata
- Download URL: BlacklistReport-0.3.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30f4c3db8b5c97d35fd8d189c2267b513dfa5ad37035466d79948dc122638e2c
|
|
| MD5 |
0abc5880c044115e5441dbbd26021f50
|
|
| BLAKE2b-256 |
15b6c36d7ca39f66a40ce7ed09cdb4beb509a77c2843183ed8fad0286f3d574a
|