GithubHelp home page GithubHelp logo

imclab / rtmpsnoop Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andreafabrizi/rtmpsnoop

0.0 2.0 0.0 371 KB

rtmpSnoop lets you to grab the RTMP properties from live or dumped video streams.

Python 100.00%

rtmpsnoop's Introduction

rtmpSnoop - The RTMP sniffer!

rtmpSnoop lets you to sniff RTMP streams from live TV, online channels and straming services and dump the RTMP properties in many formats. You can analyse both live and dumped streams.

Features

  • Live sniffing from one ore more interfaces
  • Read dumped streams from PCAP files
  • Dump the RTMP properties in more formats (simple list, m3u entry or rtmpdump syntax)
  • Easy to use and cross platform!

Requirements

rtmpSnoop works both on Windows and Unix.
To run it you need only python (at least 2.7 version) and the scapy module.

Linux Installation

  • Debian/Ubuntu:
    apt-get install python-scapy

  • RedHat/Centos:
    yum install scapy.noarch
    yum install python-argparse.noarch

Mac Installation

Unzip and cd in to dnet file then

 CFLAGS='-arch i386 -arch x86_64' ./configure --prefix=/usr
 archargs='-arch i386 -arch x86_64' make
 sudo make install
 cd python
 sudo python setup.py install

Windows Installation
Follow this guide to install scapy module on windows: http://www.secdev.org/projects/scapy/doc/installation.html#windows

Usage

The syntax is quite simple:

$python rtmpSnoop.py -h
usage: rtmpSnoop.py [-h] [-i DEVICE | -f PCAPFILE]
                    [--out-list | --out-m3u | --out-rtmpdump] [-p PORT]
                    [--one] [--quiet] [--debug]

rtmpSnoop lets you to grab the RTMP properties from live or dumped streams.

optional arguments:
  -h, --help      show this help message and exit

Input:
  -i DEVICE       Device to sniff on (Default: sniffs on all devices)
  -f PCAPFILE     PCAP file to read from

Output format:
  --out-list      Prints the RTMP data as list (Default)
  --out-m3u       Prints the RTMP data as m3u entry
  --out-rtmpdump  Prints the RTMP data in the rtmpdump format

Additional options:
  -p PORT         RTMP port (Default: sniffs on all ports)
  --one           Quit after the first stream found
  --quiet         Doesn't print anything except the RTMP output
  --debug         Enable DEBUG mode

Examples

Sniffing on all interfaces, without filters:

sudo python rtmpSnoop.py

Sniffing on eth0, and looking for RTMP streams on port 1935 only:

sudo python rtmpSnoop.py -i eth0 -p 1935

Reading streams from PCAP file:

python rtmpSnoop.py -f dump/tv.pcap

Output formats

Default list:

url: rtmp://192.168.1.1/live/channel?id=123
app: live
pageUrl: http://www.test.com/embedded/channel/1/500/380
swfUrl: http://www.test.eu/static/player.swf
tcUrl: rtmp://192.168.1.1/live
playPath: channel?id=123
flashVer: LNX 11,7,700,203
extra: S:OK 

m3u entry:

#EXTINF:0,1, Stream
rtmp://192.168.1.1/live/channel?id=12345 app=live pageUrl=http://www.test.eu/embedded/channel/1/500/380 
swfUrl=http://www.test.eu/static/player.swf tcUrl=rtmp://192.168.1.1/live playPath=channel?id=123 conn=S:OK live=1

rtmpdump syntax:

rtmpdump -r 'rtmp://192.168.1.1/live/channel?id=12345' -a 'live' -t 'rtmp://192.168.1.1/live' 
-y 'channel?id=12345' -W 'http://www.test.eu/scripts/player.swf' -p 'http://www.test.eu/embedded/channel/1/500/380' 
-f 'LNX 11,7,700,203' -C S:OK  --live -o stream.flv

Donations

If you want to support this project, please consider donating:

rtmpsnoop's People

Contributors

andreafabrizi avatar burlito avatar moshekaplan avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.