I have a users online script that records user's IP addresses and I have an image gallery site. Lately I've had a crap load of kids with bots scraping my site and taking all my images.. thus sucking the bandwidth out from under me.
I could block IP ranges every 5 seconds I think but the problem is, I don't know much about IPs. I know they can be altered but here's the thing. I looked at my log while being scraped and the first three sets of the IP are the same but the last set changes.
Does the last set determine if it's the same person or not? Or is it guaranteed to be the same person?
Ie.
64.12.116.67
64.12.116.202
64.12.116.201
This is the real IP addresses. Now I think this is the same person but I'm not 100% sure. They are online at the same time.
So can I create a Perl script to filter out IPs that match the first three sets or does the last set matter, too?
Sorry this is more of a technical question, but I need to figure something out before I use up all my bandwidth and my host beats me up.
Also, there's no need to reiterate that IP addresses can be spoofed and there's no 100% way. I know that.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.