Skip to content

Instantly share code, notes, and snippets.

@masaki
Forked from typester/rtmp connect dumper
Created December 10, 2008 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masaki/34327 to your computer and use it in GitHub Desktop.
Save masaki/34327 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin::libs;
use YAML;
use Sniffer::RTMP;
my $dev = $ARGV[0] or die 'require device name';
$| = 1;
Sniffer::RTMP->new(
device => $dev,
callbacks => {
invoke => sub {
my ($dir, $packet, $method, $id, $args) = @_;
return unless $method eq 'connect';
my $connect_info = $args->[0];
warn Dump({
page => $connect_info->{pageUrl},
swf => $connect_info->{swfUrl},
rtmp => $connect_info->{tcUrl},
});
},
},
)->run;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment