Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

hide stream url

Posted on 2006-04-16
14
Medium Priority
?
657 Views
Last Modified: 2008-01-09
Hello - does anyone know how to hide a video stream url to the public using javascript?

Thanks.
0
Comment
Question by:epmo
  • 5
  • 3
  • 2
  • +2
12 Comments
 
LVL 33

Expert Comment

by:shalomc
ID: 16464641
Sorry, you can't hide the url, because you can't hide the html.
If the html page is interpreted by the browser, then anyone can read it and see the video stream url.

ShalomC
0
 
LVL 33

Expert Comment

by:shalomc
ID: 16464776
quite obvious from the page source...
2 minutes of reverse engineering is all it took...

http://www.forbes.com/video/fvn/lists/tm_06billionaires_branson.vas?player=wm§ion=/video


ShalomC
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:shalomc
ID: 16465675
actually there is a technique even easier than reverse engineering the javascript:
using a personal proxy like achilles, paros or burp to trace the http requests.
The javascript can be as obfuscated as you want, eventually there is access over http to the video url.

ShalomC
0
 
LVL 14

Expert Comment

by:sam2912
ID: 16466722
This is because the browser somehow needs to know the URI to get the video from. If you want to hide the URI, you can try using Flash.
0
 
LVL 33

Expert Comment

by:shalomc
ID: 16467485
By using a controlled proxy, no url can hide from prying eyes, not even if it is embeded in a flashlet.
Why is it so important to you to hide the video url? Are you afraid of copyright infringement? do you want to charge money for viewing your stuff?
0
 

Author Comment

by:epmo
ID: 16474404
Thanks for your reply.

Is there a way to hide it then?

We need to hide it to avoid hotlinking and bandwith theft.
0
 
LVL 15

Expert Comment

by:dbritt
ID: 16474511
Not really a JavaScript question anymore...but...

http://www.alistapart.com/articles/hotlinking

http://www.google.com/search?hl=en&q=prevent+hotlinking

Good luck w/ your anti theft endeavors ;)
0
 
LVL 33

Expert Comment

by:shalomc
ID: 16475397
Then why don't you put it on youtube.com? No bandwidth lost......
Actually, the way forbes did it will stop 95% of hotlinking attempts.
Heck, they succeeded to fool you :=>

ShalomC
0
 
LVL 14

Expert Comment

by:sam2912
ID: 16635707
I mean, why not use flash to play the video? It's one of the best ways to hide the source.

Hmm, what about Java applets then?
0
 

Author Comment

by:epmo
ID: 16647502
Thanks for your reply. Yes we need to charge for video content. They say flash can be hacked as well. We are looking for a windows solution to protect stream url's. there have to be something out there. Someone told us about .htprotect not sure what that is.
0
 
LVL 2

Accepted Solution

by:
dcotruta earned 2000 total points
ID: 17382177
Do you still need an answer to this?

It can be done very easily in .htaccess in your media folder.

General syntax is:

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !(YOUR IP GOES HERE)
RewriteCond %{HTTP_REFERER} !http\:\/\/\.yourdomain\.net/.* [NC] (this allows any page from your root to be the referer, you can remove the .* and add a particular folder.
RewriteRule \.(wmv OR avi OR whatever filetype you use)$ - [F]

Example:

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !1.2.3.4
RewriteCond %{HTTP_REFERER} !http\:\/\/\.www\.freevideos\.com/news-videos.* [NC]
RewriteCond %{HTTP_REFERER} !http\:\/\/\.www\.freevideos\.com/funny-videos/.* [NC]
RewriteRule \.(wmv)$ - [F]

Any site trying to access the streams (either by embedding or via Iframe will get a 403 Forbidden. Heck, if you type the url directly in the browser (or a media player) you'll still get a 403 because you don't have the correct referer (of course this can be circumvented with a referer spoofer but unless you are willing to invest in a membership system with full session control there is nothing more you can do.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question