PDA

View Full Version : Goatse.cx hack


DefSTONED
15 Sep 2001, 11:49
About

This is a simple hack that replaces evil goatse.cx links with a friendly link to gratuitous kitty pictures at www.oralse.cx

This should work on all versions of vB but has only been tested in v2.0.3


Code

In functions.php, add the following function anywhere you please...I've put it above the function censortext to keep the hack all in one place.

// ###################### Start stri_replace #####################
// Case-insensitive str_replace function found on php.net

function stri_replace($searchFor, $replaceWith, $string, $offset = 0) {

$lsearchFor = strtolower($searchFor);
$lstring = strtolower($string);
$newPos = strpos($lstring, $lsearchFor, $offset);

if (strlen($newPos) == 0) {
return($string);
} else {
$left = substr($string, 0, $newPos);
$right = substr($string, $newPos + strlen($searchFor));
$newStr = $left . $replaceWith . $right;
return stri_replace($searchFor, $replaceWith, $newStr, $newPos + strlen($replaceWith));
}
}

At the top of the function censortext replace the following code:

// ###################### Start censortext #######################
function censortext($text) {
global $enablecensor,$censorwords,$censorword,$censorchar;

with this:

// ###################### Start censortext #######################
function censortext($text) {
global $enablecensor,$censorwords,$censorword,$censorchar;

//start goatse hack
$text = stri_replace("http://www.goatse.cx","http://www.oralse.cx",$text);
$text = stri_replace("http://goatse.cx","http://oralse.cx",$text);
//end goatse

That is all folks! People can now blindly click links in the knowledge that they won't be faced with Mr Goatse, but instead a friendly little kitten :)

merk
15 Sep 2001, 16:18
lol.

I wouldnt just ban people who past that link on my board.

Nice little hack there

Chen
15 Sep 2001, 17:25
LOL good idea. :D

Dakota
18 Sep 2001, 18:01
*Warning...do not click the link*

I would also suggest adding www.comp-u-geek.net

KuraFire
19 Sep 2001, 14:09
We simply censored the words goatse, goatse.cx, goatsey(.cx), g0ats3(.cx)....

Works, too. But if a user REALLY wants to be annoying, he just makes a refresh page somewhere on geocities that sends the surfer to goatse, and links to that refresh page. You can't do anything against that... :(

(except for just banning that user ^_^)

amykhar
19 Sep 2001, 14:15
Sorry for the interruption, but is this really a problem on boards? Yikes.

Amy

Dalius
19 Sep 2001, 18:21
Hehe
This works!
Thanks

grumpy
19 Sep 2001, 18:36
Originally posted by Dakota
*Warning...do not click the link*


LOL! I wish they'd posted that in the original post, I REALLY wish I hadn't been curious about this.


This link has not been posted on my forums, but I can see a lot of possibilities for it. People that insist on spamming my forum with links to sites not allowed can easily be diverted, it can be a better substitute for the censor in some instances. Thanks :)

DefSTONED
20 Sep 2001, 15:53
Yeah, I'm sorry that I didn't warn you about what's at the site...but that is why I didn't link it :D

I see the link posted on many forums to mock newbies and the like, it's not a major problem but a few of us thought would be a nice idea for any linkage of Mr Goatse to point somewhere nice.

Chen
20 Sep 2001, 15:59
You can also create a replcament variable, that will replace goatse.cx with oralse.cx. :)

badmeetsevil-
20 Sep 2001, 20:43
Damn, nice hack Dan! I've been hearing a lot about people wanting this. I'll put it on my board later tonight. :-D

DarkReaper
20 Sep 2001, 22:36
Someone on one of the forums I visit made their homepage goatse.cx...of course, the forum n00bs clicked it, lol.

Rcooper
09 Oct 2001, 16:13
can someone tell me what "evil goatse.cx links" Are?

Ryan

DarkReaper
09 Oct 2001, 17:21
Originally posted by rcooper
can someone tell me what "evil goatse.cx links" Are?

Ryan

Goatse.cx is a website. It has a fairly large picture of a guy spreading his anus....lovely ;)