Forum Moderators: phranque

Message Too Old, No Replies

Site is getting leeched.

         

Mahoney1

9:37 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



Iam having a nightmare, theres a chinese forum and some other forums to, thats posting all my images on it and its using over 400mb per day of bandwidth! I have searched this forum and tryed many things to stop this including mod_rewrite but its seems my server doesnt support that. What other options do I have? whould it be possible to put the images in a special protected folder and then use PHP to ask for them? (I have no idea about PHP but I'll learn fast if this is an option) also I see people using website rippers and downloading my entire site! (one called webreaper is poping up alot) man this is a bloody nightmare, what can I do?

Best Regards

Mahoney1

10:30 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



Quick question: how do I block an IP range? 212.138.47.** This guy is leeching my entire site and his ip is changing all the time.

marcs

10:33 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



deny from 212.138.47

ought to do the trick and block that /24

Mahoney1

10:42 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



Is there anyway I can quickly block all the images that there leeching from that forum? I have just been through my logs and there leeching there entire lot! over 400 images posted in different threads. I feel raped :(

PanUK

10:46 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



As marcs says it's a htaccess problem, check the link below.

[webmasterworld.com...]

SlowMove

10:48 pm on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could always change the names of your images, and update the links on your pages that point to them. Then you could upload some other images that the leeches don't really expect or want to see. Of course, that wouldn't help with webreaper

Mahoney1

11:12 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



Renaming the images and updating the links for over 400 images would take days and then it would and my host seems very limited to what I can do with my .htaccess file, so I think theres no other option than to close my site :(

Also it would only take them afew minutes to re-add them all, with the scripts there using :(

marcs

11:24 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



You could also use .htaccess to prevent hotlinking, sounds like that may actually be a better solution than blocking an IP range. Something like this cold work :


RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?your_domain.com/.*$ [NC]
RewriteRule \.(gif¦jpg)$ - [F]

SlowMove

11:25 pm on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I haven't really thought about how to do it, but I'm sure that you could run a script that changes the names of the image files and updates all the links automatically. It could happen at random, say, whenever someone inadvertantly requests /yoursite/changeimages.php

[edited by: SlowMove at 11:26 pm (utc) on Jan. 11, 2004]

Mahoney1

11:26 pm on Jan 11, 2004 (gmt 0)

10+ Year Member



I allready tryed that marcs, my host does'nt have it enabled :(

too much information

11:57 pm on Jan 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I created a file in ASP (it could easily be converted to PHP) that pulled the image from it's location based on an encoded querystring that was passed. It also checked to see where the call was comming from, and if it was not from the page where the image was intended to be, it returned a 1 pixel, transparent gif.

I also used session variables to verify that the visitor was on my site. No cookies, no image.

Mahoney1

12:23 am on Jan 12, 2004 (gmt 0)

10+ Year Member



Could you possibly share that marvelous piece of code with me?
I would be very grateful for this, also is it easy to convert to php as I dont even know php but its the only way I can keep my website online, so I will have to learn a little.

Best Regards
Mike

lizzie

12:28 am on Jan 12, 2004 (gmt 0)

10+ Year Member


If you have hosting with a cpanel interface your problem is solved very easily. Use the "hotlink" tab and simply enter the types of files you do not want anyone to link to, such as .jpg, .gif, .html, etc.

PatrickDeese

12:37 am on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> if it was not from the page where the image was intended to be, it returned a 1 pixel, transparent gif.

I did something similar, except I made an advert for my site, ala "Thanks for your interest, please visit Widgets.com".

Mahoney1

1:22 am on Jan 12, 2004 (gmt 0)

10+ Year Member



I managed to get the posts on that forum deleted :) I replaced some of the images with warinings with that users IP pasted all over them, in both english and chinese. I can see this being a major issue though, so a need a solution now before my site gets even bigger.

markus007

7:05 am on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In ASP.net when people link to images on your server you can rewrite the image on the fly so that you just send the visitor a banner etc about your site.