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.
Metadata
Release files for BlacklistReport 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| BlacklistReport-0.5.0.tar.gz | 20.9 kB | Without provenance | Details for BlacklistReport-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| BlacklistReport-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for BlacklistReport-0.5.0-py3-none-any.whl |
Total release size: 42.6 kB
Release files / BlacklistReport-0.5.0.tar.gz
| Download URL | BlacklistReport-0.5.0.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03652a52887af88c2be4274f64fd11627e06091980ef1b86cef098440ce295de
|
|
BLAKE2b-256 checksum How to use checksums |
e11b4c738917e46f08938411fdf8d67d284318c5dec43a5eacb1f51889f1f398
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / BlacklistReport-0.5.0-py3-none-any.whl
| Download URL | BlacklistReport-0.5.0-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2444cf58f26da0ac0a3ed3b986518721d23c674c73d4e84da9820b8b576424cf
|
|
BLAKE2b-256 checksum How to use checksums |
4292dcce5b66043ad94bbcef8b818bc4867323d3de2192a96a15e0903409203f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for BlacklistReport 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.