2020-09-30 16:53:55 +02:00

36 lines
574 B
Perl

# client.pl - works with nt.cli
if (!defined($ARGV[0]))
{
print "You must specify an input file.\n";
goto end;
}
open(F, $ARGV[0]);
@lines = <F>;
close(F);
foreach $line (@lines)
{
goto p1;
if ($line =~ m/------- SDP.*-*/)
{
print $line;
}
p1:
if ($line =~ /Client root\: (.*)/) {
$root = $1;
}
if ($line =~ /Server address\: (.*)/) {
$server = $1;
print $root . "=" . $server . "\n";
$root = "";
$server = "";
}
}
end:
print "bye";