duanbo6871 2017-12-05 03:20
浏览 107

使用php隐藏hls流的auth标记,使用动态JavaScript混淆来防止卷曲

I have a website that streams some tv channels. All are HLS streams.

SO, for each m3u8 file, we attach an authentication token (Ex. xxxx.m3u8?t=xxxxxx&e=xxxxx). this token will work for all channels for few minute.

With my current week security, all unauthorized website owners are curling any channel page and extracting that auth token to use with my static m3u8 files.

Here is my player code,

<div id="oWhrSRcF4qjyr0x"><div>
<script type="text/javascript">
var logo = "http://example/logo.png
var link = "http://example.com
jwplayer("oWhrSRcF4qjyr0x").setup({
"autostart":true,
"androidhls":"true",
"stretching": "exactfit",
"file":"http://example.com/stream.m3u8?t=xxxxxx&e=xxxxx",
"logo": {"file":logo,"margin":"-0", "position":"top-left","hide":"false","link":link},
});
</script>

In the above player, "file":"http://example.com/stream.m3u8?t=xxxxxx&e=xxxxx", keeps on changing for few minutes.

What i want to do here is obfuscating the entire player element not just the auth token from my server using php. i am aware that obfuscated code can be revealed easily, but here the token keeps on changing. i dont want a simple php file on their site to get auth token from my site.

Also, in my opinion, they cant use entire page as it contains my site logo.

I would be glad if anyone can help me with these.

  • protecting my auth token.
  • prevent curling my player.

Also, i tried to prevent curling my player by adding a session id to all links, but people are smart to bypass it, also i tried to obfuscated with Dean Edwards 's Packer, Its not a hiding everything. i just want to make the token not to be extracted alone.

So, please suggest any tool like that.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 西门子S7-Graph,S7-300,梯形图
    • ¥50 用易语言http 访问不了网页
    • ¥50 safari浏览器fetch提交数据后数据丢失问题
    • ¥15 matlab不知道怎么改,求解答!!
    • ¥15 永磁直线电机的电流环pi调不出来
    • ¥15 用stata实现聚类的代码
    • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
    • ¥20 docker里部署springboot项目,访问不到扬声器
    • ¥15 netty整合springboot之后自动重连失效
    • ¥15 悬赏!微信开发者工具报错,求帮改