Skip to main content

XMPP-OTR logging handler for Python

This is a Python library for logging to XMPP destinations using OTR (Off-the-Record Messaging) encryption.

Features

  • OTRv2

  • Pure python (no libotr dependency)

  • Log to multiple destinations

  • Optionally check log destinations’ OTR fingerprints

Installation

$ sudo pip install --pre xmpppy  # xmpppy is tagged as an "rc" version
$ sudo pip install otrxmpplogger

Example

from otrxmpplogger import OTRXMPPLogger
import logging
import time
log = logging.getLogger()
privkey = open('.otrprivkey', 'r').read()
handler = OTRXMPPLogger(
    'bradass87@jabber.ccc.de/datadiode',
    'supersecret',
    [
        (
            'mendax@jabber.wikileaks.org',
            '33eb6b01c97ceba92bd6b5e3777189c43f8d6f03'
        ),
        'esnowden@chat.nsa.gov'
    ],
    privkey
)

log.addHandler(handler)
log.debug('setting up OTR')  # Trigger OTR setup
time.sleep(3)  # Give OTR a little while to go active
log.critical('@6 is a rat!')

Notes

  • XMPP invitations are not handled

  • It seems to take roughly 3 seconds to set up an OTR session. Messages logged before the session is ready may be lost.

Dependencies

Author

Donations

If you found this software useful and would like to encourage its maintenance and further development, please consider making a donation to the Bitcoin address 13RrGMM1YUduzSrw5BhE7BXFGPtBDQYnpQ.

License

This is free and unencumbered public domain software. For more information, see http://unlicense.org/ or the accompanying UNLICENSE file.

Metadata

Release files for OTRXMPPLogger 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OTRXMPPLogger 1.0.3
File Size Uploaded Provenance
OTRXMPPLogger-1.0.3.tar.gz 2.9 kB Without provenance Details

Release files / OTRXMPPLogger-1.0.3.tar.gz

Download URL OTRXMPPLogger-1.0.3.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cabef87a896d51e27817079d664866a917666805160c267af1e2db3a5aa1f86d
BLAKE2b-256 checksum
How to use checksums
69f39cce57702be412f532b4065f4ecbc21eae67fecd6b73dbdede6f03fa68ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for OTRXMPPLogger 1.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page