Simple front-end for decrypting captured SRTP and SRTCP packets using:
install
Install devel libpcap and libsrtp if you need to, e.g.:
sudo apt-get install libpcap-dev libsrtp0-dev
and then:
pip install dsrtp
usage
command
To e.g. decrypt captured packets and write then back to a capture file:
dsrtp test/fixtures/av.pcap /tmp/rtp.pcap -ld -k test/fixtures/av_material.hex
If you have a cluttered capture (e.g. multiple SRTP streams) then you can select e.g. the in-bound stream by address:port like:
dsrtp test/fixtures/av.pcap /tmp/rtp.pcap -k test/fixtures/av_material.hex -l d -i 192.168.121.234:60401
lib
To do the same in code:
import dsrtp
enc_km = open('test/fixtures/av_material.hex').read()
km = dsrtp.KeyingMaterial.unpack_hex(enc_km)
p = dsrtp.SRTPPolicy(ssrc_type=dsrtp.SRTPPolicy.SSRC_ANY_INBOUND, key=km.local)
with dsrtp.SRTP(p) as ctx, \
open('test/fixtures/av.pcap', 'rb') as srtp_pcap, \
open('/tmp/rtp.pcap', 'wb') as rtp_pcap:
pkts = dsrtp.read_packets(srtp_pcap)
decrypted_pkts = dsrtp.decrypt_packets(ctx, pkts)
dsrtp.write_packets(rtp_pcap, decrypted_pkts)
dev
Create a venv:
mkvirtualenv dsrtp
pip install Cython
then get it:
git clone git@github.com:mayfieldrobotics/dsrtp.git
cd dsrtp
workon dsrtp
pip install -e .[test]
and test it:
py.test test/ --cov dsrtp --cov-report term-missing --pep8
release
Tests pass:
py.test test/ --cov dsrtp --cov-report term-missing --pep8
so update __version__ in:
dsrtp/__init__.py
commit and tag it:
git commit -am "release v{version}"
git tag -a v{version} -m "release v{version}"
git push --tags
Metadata
Release files for dsrtp 0.2.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 |
|---|---|---|---|---|
| dsrtp-0.2.0.tar.gz | 66.6 kB | Without provenance | Details for dsrtp-0.2.0.tar.gz |
Release files / dsrtp-0.2.0.tar.gz
| Download URL | dsrtp-0.2.0.tar.gz |
|---|---|
| Size | 66.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c42ee62e73b4ad7319fb2f3845fd52e44bd46e284f1cde92a869d6376293c007
|
|
BLAKE2b-256 checksum How to use checksums |
c3a453cf10bd04eafe6beb9330532c2f3ee8c5bac2dff15a724e750d5118b9eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dsrtp 0.2.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.