Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke
Author Message
boxingscene
New Member
New Member



Joined: Nov 17, 2003
Posts: 20

PostPosted: Mon Nov 17, 2003 1:50 pm Reply with quote

I run my site on a dedicated server and there is severe download leeching, I have 4 gigs of download files, people register and try and download all in a single day, when you have 20 register a day, even for a dedicated server, it quickly adds up. There must be a way to limit the leeching of files. Maybe some hack to limit amount per day or amount of transfer per day? Some module? There has to be a better way! I see sites suffer from this every single day using nuke abd this problem has been around forever. I just cant see how to this day, noone has come up with a fix.
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Nov 17, 2003 9:00 pm Reply with quote

If you allow unlimited downloading then that is not necessarily leeching. Are they 'illegally' downloading w/o linking from your site? Here is an .htaccess script (in my downloads folder) that I'm using that only allows you to download if you're referred from my site (I keep my downloads on a different site).
Code:
RewriteEngine on

RewriteCond %{HTTP_REFERER} ^$ [OR]
RewriteCond %{HTTP_REFERER} !^http://(.*)ravenphpscripts\.com/.*$ [NC]
RewriteRule .*\.([mpg|mpeg|zip|exe|avi|mov|gif|jpe?g]+)$ - [NC,F]
Of course change the linking site for your use.

Here's another one I haven't tried but it will redirect leecher's to a document of your choosing
Code:
RewriteEngine on

# You need the following rule because you can't deny anyone from accessing your leeching.jpg
RewriteRule ^/leeching.jpg$ - [PT,L]
# Here comes the condition
RewriteCond %{HTTP_REFERER} !^http://[^.]+\.YOURSITE\.com/.*$ [NC]
# Send them to leeching.jpg
RewriteRule ^(.*)\.([mpg|mpeg|zip|exe|avi|mov|gif|jpe?g]+)$ http://www.YOURSITE.com/leeching.jpg [R,L]
 
View user's profile Send private message
boxingscene







PostPosted: Tue Nov 18, 2003 8:45 am Reply with quote

The problem is I dont want the downloads to be unlimited, is there something that cuts down the amount one can download a day. I need to sets limits. Sometimes my transfer is 18 gigs a day. People are using mass downloading programs. I tried some security code feature someone told me about on nukecops but it doesnt work on 6.9, is there a 6.9 version? even with that, Ive heard about hacks that limit what one user can download per day or amount of transfer but havent seen it for myself. Crying or Very sad
 
Raven







PostPosted: Tue Nov 18, 2003 9:05 am Reply with quote

To fully accomplish what you are talking about (to thwart mass downloading programs) would need to be done on the server side, possibly through something link mod_throttle. On a purely user basis, implementing the .htaccess script and the download addon like what I have here will not stop it, but it will cause them some time to do each download. I suppose a mod could be written that keeps track of the number of downloads, per user per day, and locks them out. If you run your own linux server you could use Squid Proxy.
 
blith
Client



Joined: Jul 18, 2003
Posts: 977

PostPosted: Tue Nov 18, 2003 9:11 am Reply with quote

Good morning! Raven, where would you put the code you mentioned and how does it work? Thanks!
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Tue Nov 18, 2003 9:25 am Reply with quote

It's all spelled out in my post above Smile
 
blith







PostPosted: Tue Nov 18, 2003 2:51 pm Reply with quote

oh my goodness!! I was so excited about the info I did not even read it all. My apologies... Embarassed
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Security - PHP Nuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©