FreeBSD Bugzilla – Attachment 199920 Details for
Bug 232901
multimedia/librtmp: OpenSSL 1.1.x patch (r482967) causes segfault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Failure script
rec_radiko.sh (text/plain), 4.08 KB, created by
takefu
on 2018-12-07 07:07:26 UTC
(
hide
)
Description:
Failure script
Filename:
MIME Type:
Creator:
takefu
Created:
2018-12-07 07:07:26 UTC
Size:
4.08 KB
patch
obsolete
>#!/bin/sh > >pid=$$ >date=`env TZ=JST-09 date '+%Y-%m-%d-%H_%M'` >playerurl=http://radiko.jp/apps/js/flash/myplayer-release.swf >tmpdir=/tmp >cookiefile=$tmpdir/cookie.txt >playerfile=$tmpdir/player.swf >keyfile=$tmpdir/authkey.png >AUTH1=$tmpdir/auth1_fms_${pid} >AUTH2=$tmpdir/auth2_fms_${pid} >channel=`echo $1 | tr '[[a-z]]' '[[A-Z]]'` > >if [ $# -eq 1 ]; then > output=${channel}_${date}.flv >elif [ $# -eq 2 ]; then > output=$2 >elif [ $# -eq 4 ]; then > output=$2 > mail=$3 > pass=$4 >elif [ $# -eq 5 ]; then > output=$2 > mail=$3 > pass=$4 > rectime="--stop "$5 >else > echo "usage : $0 channel_name [outputfile] [mail] [pass] [recordingtime(sec)]" > exit 1 >fi > >### ># radiko premium >### >if [ $mail ]; then > /usr/local/bin/wget -q --save-cookie=$cookiefile \ > --keep-session-cookies \ > --post-data="mail=$mail&pass=$pass" --no-check-certificate\ > -O /dev/null\ > https://radiko.jp/ap/member/login/login > > if [ ! -f $cookiefile ]; then > echo "failed login" > exit 1 > fi >fi > ># ># get player ># >if [ ! -f $playerfile ]; then > /usr/local/bin/wget -q -O $playerfile $playerurl > > if [ $? -ne 0 ]; then > echo "failed get player" > exit 1 > fi >fi > ># ># get keydata (need swftool) ># >if [ ! -f $keyfile ]; then > /usr/local/bin/swfextract -b 12 $playerfile -o $keyfile > > if [ ! -f $keyfile ]; then > echo "failed get keydata" > exit 1 > fi > rm -f $playerfile >fi > >if [ -f $AUTH1 ]; then > rm -f $AUTH1 >fi > ># ># access auth1_fms ># >/usr/local/bin/wget -q \ > --header="pragma: no-cache" \ > --header="X-Radiko-App: pc_ts" \ > --header="X-Radiko-App-Version: 4.0.0" \ > --header="X-Radiko-User: test-stream" \ > --header="X-Radiko-Device: pc" \ > --post-data='\r\n' \ > --no-check-certificate \ > --load-cookies $cookiefile \ > --save-headers \ > -O $AUTH1 \ > https://radiko.jp/v2/api/auth1_fms > >if [ $? -ne 0 ]; then > echo "failed auth1 process" > exit 1 >fi > ># ># get partial key ># >authtoken=`/usr/local/bin/perl -ne 'print $1 if(/x-radiko-authtoken: ([\w-]+)/i)' $AUTH1` >offset=`/usr/local/bin/perl -ne 'print $1 if(/x-radiko-keyoffset: (\d+)/i)' $AUTH1` >length=`/usr/local/bin/perl -ne 'print $1 if(/x-radiko-keylength: (\d+)/i)' $AUTH1` > >partialkey=`dd if=$keyfile bs=1 skip=${offset} count=${length} 2> /dev/null | openssl enc -base64` > >printf "authtoken: ${authtoken} \noffset: ${offset} length: ${length} \npartialkey: $partialkey" > >rm -f $keyfile $AUTH1 > >if [ -f $AUTH2 ]; then > rm -f $AUTH2 >fi > ># ># access auth2_fms ># >/usr/local/bin/wget -q \ > --header="pragma: no-cache" \ > --header="X-Radiko-App: pc_ts" \ > --header="X-Radiko-App-Version: 4.0.0" \ > --header="X-Radiko-User: test-stream" \ > --header="X-Radiko-Device: pc" \ > --header="X-Radiko-AuthToken: ${authtoken}" \ > --header="X-Radiko-PartialKey: ${partialkey}" \ > --post-data='\r\n' \ > --load-cookies $cookiefile \ > --no-check-certificate \ > -O $AUTH2 \ > https://radiko.jp/v2/api/auth2_fms > >if [ $? -ne 0 -o ! -f $AUTH2 ]; then > echo "failed auth2 process" > exit 1 >fi > >echo "authentication success" > >areaid=`/usr/local/bin/perl -ne 'print $1 if(/^([^,]+),/i)' $AUTH2` >echo "areaid: $areaid" > >rm -f $AUTH2 > ># ># get stream-url ># > >if [ -f ${channel}.xml ]; then > rm -f ${channel}.xml >fi > >/usr/local/bin/wget -q "http://radiko.jp/v2/station/stream/${channel}.xml" > >stream_url=`echo "cat /url/item[1]/text()" | /usr/local/bin/xmllint --shell ${channel}.xml | tail -2 | head -1` >url_parts0=`echo ${stream_url} | /usr/local/bin/perl -pe 's!^(.*)://(.*?)/(.*)/(.*?)$/!$1://$2!'` >url_parts1=`echo ${stream_url} | /usr/local/bin/perl -pe 's!^(.*)://(.*?)/(.*)/(.*?)$/!$3!'` >url_parts2=`echo ${stream_url} | /usr/local/bin/perl -pe 's!^(.*)://(.*?)/(.*)/(.*?)$/!$4!'` > >rm -f ${channel}.xml > ># ># rtmpdump ># >/usr/local/bin/rtmpdump -v \ > ${rectime} \ > -r ${url_parts0} \ > --app ${url_parts1} \ > --playpath ${url_parts2} \ > -W $playerurl \ > -C S:"" -C S:"" -C S:"" -C S:$authtoken \ > --live \ > --flv $output >/usr/local/bin/wget -q --load-cookies $cookiefile --no-check-certificate\ > -O /dev/null https://radiko.jp/ap/member/webapi/member/logout >rm -f $cookiefile > >exit 0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 232901
: 199920 |
202807
|
202872