Skip to main content

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.

Download files

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

Source Distribution

OTRXMPPLogger-1.0.3.tar.gz (2.9 kB view details)

Uploaded Source

File details

Details for the file OTRXMPPLogger-1.0.3.tar.gz.

File metadata

  • Download URL: OTRXMPPLogger-1.0.3.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for OTRXMPPLogger-1.0.3.tar.gz
Algorithm Hash digest
SHA256 cabef87a896d51e27817079d664866a917666805160c267af1e2db3a5aa1f86d
MD5 054634f76721adb5e8cb82f76f93f5a1
BLAKE2b-256 69f39cce57702be412f532b4065f4ecbc21eae67fecd6b73dbdede6f03fa68ce

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

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