Skip to main content

Process and verify data from SNDS easily

Project description

SNDS LIB

Build Status codecov Python 3 Updates

Process and verify data from Microsoft's Smart Network Data Service (SNDS) API easily.

SNDSLIB is a wrapper around SNDS Automated Data Access API to facilitate fast data process and analysis.


What is SNDS?

Smart Network Data Service (SNDS) is a platform to monitor data from IPs that send emails to Microsoft's servers.

If you send more than 100 messages per day from your IPs, your can get valuable information about IP reputation, possible blocks, spam complaints and spamtraps hits.


Talk is cheap. Show me the code!

Installation:

SNDSLIB has no external dependancies. It runs just with python 3.6 or higher.

pip install sndslib

Simple example of library usage:

    >>> from sndslib import sndslib

    >>> r = sndslib.get_ip_status('mykey')
    >>> blocked_ips = sndslib.list_blocked_ips(r)
    >>> print(blocked_ips)
    ['1.1.1.1', '1.1.1.2']

    >>> list_blocked_ips_rdns(blocked_ips)
    [{'ip': '1.1.1.1', 'rdns': 'foo.bar.exemple.com'},
     {'ip': '1.1.1.2', 'rdns': 'foo2.bar.exemple.com'}]

    >>> r = sndslib.get_data('mykey')
    >>> sndslib.summarize(r)
    {'red': 272, 'green': 710, 'yellow': 852, 'traps': 1298, 'ips': 1834, 'date': '12/31/2019'}

    >>> sndslib.search_ip_status('1.1.1.1', r)
    {'activity_end': '12/31/2019 7:00 PM',
    'activity_start': '12/31/2019 10:00 AM',
    'comments': '',
    'complaint_rate': '< 0.1%',
    'data_commands': '1894',
    'filter_result': 'GREEN',
    'ip_address': '1.1.1.1',
    'message_recipients': '1894',
    'rcpt_commands': '1895',
    'sample_helo': '',
    'sample_mailfrom': '',
    'trap_message_end': '',
    'trap_message_start': '',
    'traphits': '0'}

CLI

This library contains a CLI to facilitate fast operations in the terminal. Here are some examples of their usage:

Summary of all IPs status

snds -k 'your-key-here' -s

Example output:

Date: 12/31/2020
IPs:       1915
Green:      250
Yellow:    1175
Red:        490
Trap Hits:  990
Blocked:    193

Individual report of a IP

snds -k 'your-key-here' -ip '1.1.1.1'

Example output:

Activity: 1/31/2020 11:59 AM until 1/31/2020 11:59 PM
IP:         1.1.1.1
Messages:    183057
Filter:       GREEN
Complaint:   < 0.1%
Trap Hits:        3

List all IPs blocked

snds -k 'your-key-here' -l

Example output:

1.1.1.1
1.1.1.2
1.1.1.3
...

List all IPs blocked with rDNS

snds -k 'your-key-here' -r

Example output:

1.1.1.1;example.domain1.com
1.1.1.2;example.domain2.com
1.1.1.3;example.domain3.com
...

You can get more information about SNDS features in the Microsoft's official pages for SNDS and SNDS Automated Data Access.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sndslib-0.1.3.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sndslib-0.1.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file sndslib-0.1.3.tar.gz.

File metadata

  • Download URL: sndslib-0.1.3.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.0 CPython/3.7.0 Windows/10

File hashes

Hashes for sndslib-0.1.3.tar.gz
Algorithm Hash digest
SHA256 df9f821e069113c525f64edac41797f33cc1af63751c4d2d77c8a55e35c36e64
MD5 f27bb383c01302e228d4fdfc9e8fefa7
BLAKE2b-256 4e198b59338809a6745bf18f5dcf57d381b9e1282d873cbc50c922bcad922a4d

See more details on using hashes here.

File details

Details for the file sndslib-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sndslib-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.0 CPython/3.7.0 Windows/10

File hashes

Hashes for sndslib-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7e16bbe835dba9745b340ef5b5f913bfeaf85757ff0b09656bc05c921a03f844
MD5 2b64b7e7d135370d46e316e3983cfbb8
BLAKE2b-256 e4f55e848e477547c0da6d2e75fe16c9d37d333eaf6b75aaf7915d2da6c38a1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page