« I survived Ohio State Mathcounts 2006My new 'box' »

Latest b2evolution hack against reefer madness....

03/10/06

  01:41:49 pm, by The Dreamer   , 196 words  
Categories: General, Software

Latest b2evolution hack against reefer madness....

Getting tired of a certain type of attack on my site of late....namely because the alledged 'origin' site tries to force you to download a trojan horse (which NAV promptly detects and blocks)....I decided it was time to block these obvious assaults, which takes the form of an invalid archive date code or an archive date that is excessively far in the future or in the past....


if( !empty($HTTP_REFERER) && strpos($HTTP_REFERER,$baseurl) !== 0)
{
	if( !empty($m) && ( strlen($m) < 4 || strlen($m) % 2 == 1 ) )
	{
		$ReqURI = $baseurl;
	   	require dirname(__FILE__).'/_referer_spam.page.php'; // error & exit
	}
	if( strlen($m) == 4 && ( intval($m) < 2004 || intval($m) > date('Y', time()) ) )
	{
		$ReqURI = $baseurl;
	   	require dirname(__FILE__).'/_referer_spam.page.php'; // error & exit
	}
	if( strlen($m) > 5 )
	{
		$im = intval(substr($m,0,6));
		if ( $im < 200404 || $im > date('Ym', time()) )
		{
			$ReqURI = $baseurl;
	   		require dirname(__FILE__).'/_referer_spam.page.php'; // error & exit
		}
	}
}

The code fragment is currently in _blog_main.php.

Some day I should sit down and learn PHP.....in the meantime, I'll just get by with the fact that knowing a programming language is not a requirement to maintain it..... &#41;&#45;&#111;

No feedback yet

Now instead of subjecting some poor random forum to a long rambling thought, I will try to consolidate those things into this blog where they can be more easily ignored profess to be collected thoughts from my mind.

Latest Poopli Updaters -- http://lkc.me/poop

bloglovin

There are 20 years 2 months 22 hours 48 minutes and 36 seconds until the end of time.
And, it has been 4 years 10 months 27 days 15 hours 14 minutes and 20 seconds since The Doctor saved us all from the end of the World!

Search

November 2017
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
Google

Linkblog

  XML Feeds

Who's Online?

  • Guest Users: 1
This seal is issued to lawrencechen.net by StopTheHacker Inc.
blog software

hosted by
Green Web Hosting! This site hosted by DreamHost.

monitored by
Monitored by eXternalTest
SiteUptime Web Site Monitoring Service
website uptime