<spanclass="n">logging</span><spanclass="o">.</span><spanclass="n">warning</span><spanclass="p">(</span><spanclass="s2">"GeoLite2-Country.mmdb is missing."</span>
<spanclass="s2">"please install and run geoipupdate as root to "</span>
<spanclass="s2">"get the latest version."</span><spanclass="p">)</span>
<li><ahref="index.html#parsedmarc.elastic.save_forensic_report_to_elasticsearch">save_forensic_report_to_elasticsearch() (in module parsedmarc.elastic)</a>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">save_forensic</span></code> - bool: Save forensic report data to the Elasticsearch and/or Splunk</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">strip_attachment_payloads</span></code> - bool: Remove attachment payloads from results</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">output</span></code> - str: Directory to place JSON and CSV files in</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">offline</span></code> - bool: Do not use online queries for geolocation or DNS</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">nameservers</span></code> - str: A comma separated list of DNS resolvers (Default: <aclass="reference external"href="https://1.1.1.1/">Cloudflare’s public resolvers</a>)</p></li>
<li><p><codeclass="docutils literal notranslate"><spanclass="pre">dns_timeout</span></code> - float: DNS timeout period</p></li>
@@ -1619,12 +1620,6 @@ that enforce with a DMARC quarantine or reject policy.</p>
<divclass="section"id="module-parsedmarc">
<spanid="api"></span><h2>API<aclass="headerlink"href="#module-parsedmarc"title="Permalink to this headline">¶</a></h2>
<p>A Python package for parsing DMARC reports</p>
<dlclass="exception">
<dtid="parsedmarc.IMAPError">
<emclass="property">exception </em><codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">IMAPError</code><aclass="reference internal"href="_modules/parsedmarc.html#IMAPError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.IMAPError"title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when an IMAP error occurs</p>
</dd></dl>
<dlclass="exception">
<dtid="parsedmarc.InvalidAggregateReport">
<emclass="property">exception </em><codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">InvalidAggregateReport</code><aclass="reference internal"href="_modules/parsedmarc.html#InvalidAggregateReport"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.InvalidAggregateReport"title="Permalink to this definition">¶</a></dt>
@@ -1649,15 +1644,9 @@ that enforce with a DMARC quarantine or reject policy.</p>
<dd><p>Raised whenever the parser fails for some reason</p>
</dd></dl>
<dlclass="exception">
<dtid="parsedmarc.SMTPError">
<emclass="property">exception </em><codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">SMTPError</code><aclass="reference internal"href="_modules/parsedmarc.html#SMTPError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.SMTPError"title="Permalink to this definition">¶</a></dt>
<dd><p>Raised when a SMTP error occurs</p>
</dd></dl>
<dlclass="function">
<dtid="parsedmarc.email_results">
<codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">email_results</code><spanclass="sig-paren">(</span><emclass="sig-param">results</em>, <emclass="sig-param">host</em>, <emclass="sig-param">mail_from</em>, <emclass="sig-param">mail_to</em>, <emclass="sig-param">port=0</em>, <emclass="sig-param">ssl=False</em>, <emclass="sig-param">user=None</em>, <emclass="sig-param">password=None</em>, <emclass="sig-param">subject=None</em>, <emclass="sig-param">attachment_filename=None</em>, <emclass="sig-param">message=None</em>, <emclass="sig-param">ssl_context=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc.html#email_results"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.email_results"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">email_results</code><spanclass="sig-paren">(</span><emclass="sig-param">results</em>, <emclass="sig-param">host</em>, <emclass="sig-param">mail_from</em>, <emclass="sig-param">mail_to</em>, <emclass="sig-param">mail_cc=None</em>, <emclass="sig-param">mail_bcc=None</em>, <emclass="sig-param">port=0</em>, <emclass="sig-param">require_encryption=False</em>, <emclass="sig-param">verify=True</em>, <emclass="sig-param">username=None</em>, <emclass="sig-param">password=None</em>, <emclass="sig-param">subject=None</em>, <emclass="sig-param">attachment_filename=None</em>, <emclass="sig-param">message=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc.html#email_results"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.email_results"title="Permalink to this definition">¶</a></dt>
<dd><p>Emails parsing results as a zip file</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
@@ -1665,15 +1654,17 @@ that enforce with a DMARC quarantine or reject policy.</p>
<codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">parse_aggregate_report_file</code><spanclass="sig-paren">(</span><emclass="sig-param">_input</em>, <emclass="sig-param">nameservers=None</em>, <emclass="sig-param">dns_timeout=2.0</em>, <emclass="sig-param">parallel=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc.html#parse_aggregate_report_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.parse_aggregate_report_file"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">parse_aggregate_report_file</code><spanclass="sig-paren">(</span><emclass="sig-param">_input</em>, <emclass="sig-param">offline=False</em>, <emclass="sig-param">nameservers=None</em>, <emclass="sig-param">dns_timeout=2.0</em>, <emclass="sig-param">parallel=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc.html#parse_aggregate_report_file"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.parse_aggregate_report_file"title="Permalink to this definition">¶</a></dt>
<dd><p>Parses a file at the given path, a file-like object. or bytes as a
aggregate DMARC report</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>_input</strong>– A path to a file, a file like object, or bytes</p></li>
<li><p><strong>offline</strong> (<em>bool</em>) – Do not query online for geolocation or DNS</p></li>
<li><p><strong>nameservers</strong> (<em>list</em>) – A list of one or more nameservers to use</p></li>
<li><p><strong>public DNS resolvers by default</strong><strong>)</strong> (<em>(</em><em>Cloudflare's</em>) –</p></li>
<li><p><strong>dns_timeout</strong> (<em>float</em>) – Sets the DNS timeout in seconds</p></li>
<codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">parse_aggregate_report_xml</code><spanclass="sig-paren">(</span><emclass="sig-param">xml</em>, <emclass="sig-param">nameservers=None</em>, <emclass="sig-param">timeout=2.0</em>, <emclass="sig-param">parallel=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc.html#parse_aggregate_report_xml"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.parse_aggregate_report_xml"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">parsedmarc.</code><codeclass="sig-name descname">parse_aggregate_report_xml</code><spanclass="sig-paren">(</span><emclass="sig-param">xml</em>, <emclass="sig-param">offline=False</em>, <emclass="sig-param">nameservers=None</em>, <emclass="sig-param">timeout=2.0</em>, <emclass="sig-param">parallel=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc.html#parse_aggregate_report_xml"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.parse_aggregate_report_xml"title="Permalink to this definition">¶</a></dt>
<dd><p>Parses a DMARC XML report string and returns a consistent OrderedDict</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>xml</strong> (<em>str</em>) – A string of DMARC aggregate report XML</p></li>
<li><p><strong>offline</strong> (<em>bool</em>) – Do not query online for geolocation or DNS</p></li>
<li><p><strong>nameservers</strong> (<em>list</em>) – A list of one or more nameservers to use</p></li>
<li><p><strong>public DNS resolvers by default</strong><strong>)</strong> (<em>(</em><em>Cloudflare's</em>) –</p></li>
<li><p><strong>timeout</strong> (<em>float</em>) – Sets the DNS timeout in seconds</p></li>
<spanid="parsedmarc-splunk"></span><h3>parsedmarc.splunk<aclass="headerlink"href="#module-parsedmarc.splunk"title="Permalink to this headline">¶</a></h3>
<dlclass="class">
<dtid="parsedmarc.splunk.HECClient">
<emclass="property">class </em><codeclass="sig-prename descclassname">parsedmarc.splunk.</code><codeclass="sig-name descname">HECClient</code><spanclass="sig-paren">(</span><emclass="sig-param">url</em>, <emclass="sig-param">access_token</em>, <emclass="sig-param">index</em>, <emclass="sig-param">source='parsedmarc'</em>, <emclass="sig-param">verify=True</em>, <emclass="sig-param">timeout=60</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc/splunk.html#HECClient"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.splunk.HECClient"title="Permalink to this definition">¶</a></dt>
<dd><p>A client for a Splunk HTTP Events Collector (HEC)</p>
@@ -2209,7 +2206,7 @@ standard RFC 822 format</p>
<dlclass="function">
<dtid="parsedmarc.utils.get_ip_address_country">
<codeclass="sig-prename descclassname">parsedmarc.utils.</code><codeclass="sig-name descname">get_ip_address_country</code><spanclass="sig-paren">(</span><emclass="sig-param">ip_address</em>, <emclass="sig-param">parallel=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc/utils.html#get_ip_address_country"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.utils.get_ip_address_country"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname">parsedmarc.utils.</code><codeclass="sig-name descname">get_ip_address_country</code><spanclass="sig-paren">(</span><emclass="sig-param">ip_address</em>, <emclass="sig-param">parallel=False</em>, <emclass="sig-param">offline=False</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/parsedmarc/utils.html#get_ip_address_country"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#parsedmarc.utils.get_ip_address_country"title="Permalink to this definition">¶</a></dt>
<dd><p>Uses the MaxMind Geolite2 Country database to return the ISO code for the
country associated with the given IPv4 or IPv6 address</p>
<dlclass="field-list simple">
@@ -2217,6 +2214,7 @@ country associated with the given IPv4 or IPv6 address</p>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>ip_address</strong> (<em>str</em>) – The IP address to query for</p></li>
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.