Announcement

Collapse
No announcement yet.

An anti-leech script...?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • An anti-leech script...?

    Hello,

    This isn't VB related by I figure someone here might have an idea. I'm currently looking for an anti-leech script. And thus far I've come up with nothing, especially that are coded in php. I'm more than willing to pay for one, I just need a suggestion or two if someone would be kind enough to do so.

    If someone is willing to code one for me, just give me an estimate for price.

    I hope this isn't the wrong place for this post, thanks in advance to those who help.

  • #2
    Try something like this:
    http://www.pinkgoblin.com/bandwidthprotection.php

    Comment


    • #3
      I'm looking for something that will protect multimedia files that I have available for download, and I'm not quite sure that'll do the trick. I'm a newbie when it comes to php, so please be patient with me.

      Thank you very much for the suggestion, I'm still looking into it.

      Comment


      • #4
        are the files hosted on your own host?

        Comment


        • #5
          Originally posted by Mark Wegener
          are the files hosted on your own host?
          Even better, are you on an Apache server? This is easy to do if you are. It would use the feature of the .htaccess files to deny access to files unless the HTTP referrer is within the local domain. I suggest you search vB.org for the phrases ".htaccess" or "denying access to files"

          I know I saw it on there somewhere!

          Comment


          • #6
            Code:
            RewriteEngine On
            RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/ [NC]
            RewriteCond %{HTTP_REFERER} !^http://yourdomain.com/ [NC]
            RewriteRule /* http://yourdomain.com/leechercaught.html [R,L]
            or search google for htaccess anti-leech

            Comment


            • #7
              Perfect, just what I meant for you guys to find.

              Comment


              • #8
                Thanks amigos...

                RewriteEngine on
                RewriteCond %{HTTP_REFERER} !^$
                RewriteCond %{HTTP_REFERER} !^http://mydomain.com.*$ [NC]
                RewriteCond %{HTTP_REFERER} !^http://forums.mydomain.com.*$ [NC]
                RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com.*$ [NC]
                RewriteRule .*\.(mp3|rm|mpeg|swf|ram|mov|asf)$ http://www.mydomain.com [R,NC]

                Thanks for the idea, I found this snippet for a .htaccess file, is this better or worse? Thanks again

                EDIT: I tried that, and found it didn't work. I tried the one provided above and it worked like a charm, but almost too well actually. It now stops people from entering from other than my index page. Is there anyway I can make the script ignore .php, .jpg, .gif, and .html files?

                Thanks!
                Last edited by dorkus maximus; Fri 14th Mar '03, 3:36pm.

                Comment


                • #9
                  Help, please ...

                  Comment


                  • #10
                    Did you change this to fit your domain?
                    Code:
                    RewriteEngine on 
                    RewriteCond %{HTTP_REFERER} !^$ 
                    RewriteCond %{HTTP_REFERER} !^http://mydomain.com.*$ [NC] 
                    RewriteCond %{HTTP_REFERER} !^http://forums.mydomain.com.*$ [NC] 
                    RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com.*$ [NC]
                    RewriteRule .*\.(mp3|rm|mpeg|swf|ram|mov|asf)$ http://www.mydomain.com [R,NC]
                    Then again, it looks a little messed up to me... (I'm no Apache expert, but I usually know errors when I see them...) Try this:

                    Code:
                    RewriteEngine on 
                    RewriteCond %{HTTP_REFERER} !^$ 
                    RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC] 
                    RewriteCond %{HTTP_REFERER} !^http://forums.mydomain.com/.*$ [NC] 
                    RewriteCond %{HTTP_REFERER} !^http://www.mydomain.com/.*$ [NC]
                    RewriteRule .*\.(mp3|rm|mpeg|swf|ram|mov|asf)$ http://www.mydomain.com [R,NC]
                    Change anything highlited to fit your domain. If it doesn't work, just delete the .htaccess file!
                    Last edited by dstruct2k; Tue 18th Mar '03, 10:29pm.

                    Comment


                    • #11
                      "Unhackable"? In your dreams maybe.

                      Comment


                      • #12
                        Here's what I use on our servers:

                        SetEnvIfNoCase Referer "(^http://(.*)(mydomain\.com|aliasdomain1\.com|aliasdomain2\.com))|(^$)" good_domain
                        SetEnvIfNoCase Request_URI "\.(js|gif|jpg|jpeg|png|zip|wav|mp3|avi|mov|mp2|mpg|pdf|swa|swf|wma|bmp)$" is_bwhog

                        RewriteCond %{ENV:good_domain} !=1
                        RewriteCond %{ENV:is_bwhog} =1
                        RewriteRule ^.*$ http://www.mydomain.com/leech.gif [R,L]

                        Comment


                        • #13
                          These scripts are all good in theory, but in practice there are a lot of flaws.

                          If, for example, you have the script set up to block people with a blank referer, then you rule out people using download accelorators people using firewalls (some have features to block referrers), and people using (if it's an music file) media players. Some people don't want you knowing the referrers for privacy reasons and i quite agree.

                          It also causes problems with the right-click "save target as" feature which is needed for music files when using XP as it insists on playing the files in the media browser whether you like it or not.

                          If you have it setup to allow blank referers then it's easy for sites to leech your files by just using target=_blank on the links to your files.

                          To be honest, they are more hassle than they are worth as i have tried them many times myself only to cause problems for some of my site visitors. Inevitably, my site lost a lot of hits.

                          Comment


                          • #14
                            Hello Radgam,

                            The script I provided does not block people with a blank referer (that's the (^$) part in the regex)

                            -Zen

                            Comment


                            • #15
                              well, as i explained, if you don't block blank referrers then it's easy to leech files using target=_blank, amoungst other things. It's nearly impossible to stop your files being leeched without causing potential problems to your actual site vistors.

                              Comment

                              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                              Working...
                              X