1.0.1 • Published 3 years ago
rtptool-wasm v1.0.1
┬─┐┌┬┐┌─┐┌┬┐┌─┐┌─┐┬ ┬ ┬┌─┐┌─┐┌┬┐
├┬┘ │ ├─┘ │ │ ││ ││ │││├─┤└─┐│││
┴└─ ┴ ┴ ┴ └─┘└─┘┴─┘ └┴┘┴ ┴└─┘┴ ┴
Extract RTP and Decrypt SRTP Audio streams from .PCAP files in the browser using WASM
Status
- WASM code is working, but experimental
Build Native
x86_64
./build.sh
WASM using Docker
./build-wasm-docker.sh
WASM Module Usage
Check out the included example for API usage
npm run test
Functions
- analyze_pcap
- extract_pcap
- decrypt_pcap
API
const api = {
version: Module.cwrap('version', 'string', []), // null
analyze: Module.cwrap('analyze_pcap', 'string', ['string']), // filename
extract: Module.cwrap('extract_pcap', 'string', ['string', 'string']), // ssrc, filename
extract: Module.cwrap('decrypt_pcap', 'string', ['string', 'string', 'string']), // ssrc, key, filename
};
Command-Line Usage
./dist/rtptool analyze <input file>
Extract RTP streams by ssrc prefixed by 0x
./dist/rtptool extract <ssrc> <input file>
Decrypt SRTP streams by ssrc using the RFC4568 key
./dist/rtptool decrypt <ssrc> <key> <input file>
Example Key: AES_CM_128_HMAC_SHA1_80 inline:fCaLYx1IEhD62eKqFIGOk1qykNikYcamkFVkde1b|2^31|1:1
Credits
Based on srtpdecrypt