[REL] AntiSulake PHP Class (For All CMS)

At0m

Active Member
Sep 10, 2011
101
40

AntiSulake Class
Creator: Leo "At0m" Xgr
Version: 1.0.0 [BETA]


About
Hi there... Inspired by leenster´s little script of avoid Sulake, i have created a class, more improved, that is compatible with all CMS´S. With this script you avoid that employees of the company register on your hotel.

How to Use
First, create a PHP file with the name antisulake.php and copy all the class code and than save it.

Example: How to work using UberCMS: Just put in the Global.php(The central file of the php classes) the code:
PHP:
$antiSulake = new AntiSulake();
But first you have to put a require_once 'antisulake.php'; in the code of the global...

Just this ? Yep´, it´s ready. You can make this in other´s CMS.

The Code
PHP:
/* Início das Classe */
  class AntiSulake
  {
 /* ---------------------------------------------\
 | AntiSulake Protection v1.0.0 [BETA]           |
 | --------------------------------------------- |
 | Taken from upcoming At0m´s RetroCMS           |
 | Created by: Leo "At0m" Xgr - [email protected]    |
 \----------------------------------------------*/
 
 /* Início - [ Atributos ] */
 public  $urlRedirect = "http://youfaileverything.org/"; /* YouFail Sulake */
 public  $protectionStatus = true; /* true = Website Protegido / false =  Website Desprotegido */
 private $currentHostname; /* Hostname do Visitante */
 private $currentIp; /* Ip do Visitante */
 private $blockedHosts = array("gate.sulake.com", "sulake.com"); /* Sites bloqueados de visitar */
 /* Fim - [ Atributos ] */
 
 /* Início - [ Construtor ] */
 function __construct(){
 if($this->protectionStatus){ if($this->getCurrentHostname()) { if($this->blockSulake() != false) { header('Location: '.$this->urlRedirect.''); } } }
 }
 /* Fim - [ Construtor ] */
 
 /* Início - [ Métodos ] */
 private function getCurrentHostname(){
 /* Requerimento de Informações */
 if(getenv("HTTP_CLIENT_IP")){ $ip = getenv("HTTP_CLIENT_IP");} 
 else if(getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); }
 else if(getenv("REMOTE_ADDR")) { $ip = getenv("REMOTE_ADDR"); }
 else { $ip = "0.0.0.0"; }
 
 /* Atribui o valor do Hostname/IP do visitante. */
 $this->currentHostname = gethostbyaddr($ip);
 $this->currentIp = $ip;
 
 /* Encontramos algo ? */
 if(empty($this->currentHostname) && empty($this->currentIp)){
 return (boolean)false;
 } return (bool)true;
 }
 
 public function blockSulake(){
 $weLoveSusu = array();
 /* Verifica primeiro se host possui algo com Sulake */
 foreach($this->blockedHosts as $hosts){ if(strpos(strtolower($this->currentHostname), strtolower($hosts)) !== false){ $weLoveSusu[] = true; } }
 if(count($weLoveSusu) > 0) { return (boolean)true; } return false;
 }
 /* Fim - [ Métodos ] */ 
  }
  /* Fim da Classe */

If you like it, please say loud, WE LOVE SUSU(Sulake) <3.
 

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
I love this :] but i dont quite get the FULL point of this
This is to avoid staffs of Sulake on registering on our hotel, especially Sulake Finland is now taking actions, registering on different retros.

AntiSulake Class
Creator: Leo "At0m" Xgr​
Version: 1.0.0 [BETA]​
About
Hi there... Inspired by leenster´s little script of avoid Sulake, i have created a class, more improved, that is compatible with all CMS´S. With this script you avoid that employees of the company register on your hotel.​
How to Use
First, create a PHP file with the name antisulake.php and copy all the class code and than save it.​
Example: How to work using UberCMS: Just put in the Global.php(The central file of the php classes) the code:​
PHP:
$antiSulake = new AntiSulake();
But first you have to put a require_once 'antisulake.php'; in the code of the global...​
Just this ? Yep´, it´s ready. You can make this in other´s CMS.​
The Code
PHP:
/* Início das Classe */
  class AntiSulake
  {
/* ---------------------------------------------\
| AntiSulake Protection v1.0.0 [BETA]          |
| --------------------------------------------- |
| Taken from upcoming At0m´s RetroCMS          |
| Created by: Leo "At0m" Xgr - [email protected]    |
\----------------------------------------------*/
 
/* Início - [ Atributos ] */
public  $urlRedirect = "http://youfaileverything.org/"; /* YouFail Sulake */
public  $protectionStatus = true; /* true = Website Protegido / false =  Website Desprotegido */
private $currentHostname; /* Hostname do Visitante */
private $currentIp; /* Ip do Visitante */
private $blockedHosts = array("gate.sulake.com", "sulake.com"); /* Sites bloqueados de visitar */
/* Fim - [ Atributos ] */
 
/* Início - [ Construtor ] */
function __construct(){
if($this->protectionStatus){ if($this->getCurrentHostname()) { if($this->blockSulake() != false) { header('Location: '.$this->urlRedirect.''); } } }
}
/* Fim - [ Construtor ] */
 
/* Início - [ Métodos ] */
private function getCurrentHostname(){
/* Requerimento de Informações */
if(getenv("HTTP_CLIENT_IP")){ $ip = getenv("HTTP_CLIENT_IP");}
else if(getenv("HTTP_X_FORWARDED_FOR")) { $ip = getenv("HTTP_X_FORWARDED_FOR"); }
else if(getenv("REMOTE_ADDR")) { $ip = getenv("REMOTE_ADDR"); }
else { $ip = "0.0.0.0"; }
 
/* Atribui o valor do Hostname/IP do visitante. */
$this->currentHostname = gethostbyaddr($ip);
$this->currentIp = $ip;
 
/* Encontramos algo ? */
if(empty($this->currentHostname) && empty($this->currentIp)){
return (boolean)false;
} return (bool)true;
}
 
public function blockSulake(){
$weLoveSusu = array();
/* Verifica primeiro se host possui algo com Sulake */
foreach($this->blockedHosts as $hosts){ if(strpos(strtolower($this->currentHostname), strtolower($hosts)) !== false){ $weLoveSusu[] = true; } }
if(count($weLoveSusu) > 0) { return (boolean)true; } return false;
}
/* Fim - [ Métodos ] */
  }
  /* Fim da Classe */
If you like it, please say loud, WE LOVE SUSU(Sulake) <3.
This will be useful. And let me guess, Leenster's script for RetroBanned.com before? :)
 

emonemo1234

Member
Feb 9, 2012
221
26
It's to stop staff of Sulake registering on your hotel, so you don't get shut down.
This is to avoid staffs of Sulake on registering on our hotel, especially Sulake Finland is now taking actions, registering on different retros.


This will be useful. And let me guess, Leenster's script for RetroBanned.com before? :)
So, how exactly does it work? by their sulake ip or? stuff stuff..
 

Ayumi

Joshua Pike.
Sep 13, 2010
1,028
73
Pussies lol

Scared to shit you all are, take it like a man or get groped. Not even fight fight fight fight fight for the hotel woo

I fighted for quabbo and won $200 in compensation, although they sued me everything else I made lol
 

iNerdy

Idealist
Nov 30, 2010
183
18
Pussies lol

Scared to shit you all are, take it like a man or get groped. Not even fight fight fight fight fight for the hotel woo

I fighted for quabbo and won $200 in compensation, although they sued me everything else I made lol
I think some of us would rather avoid getting sued.
 

At0m

Active Member
Sep 10, 2011
101
40
Of course there are other ways to they access. But, by the way, Sulake will not register with they hostnames.
 

Tietoturpa

New Member
Sep 29, 2012
12
0
[
Of course there are other ways to they access. But, by the way, Sulake will not register with they hostnames.
Correct me if I did something wrong ( I use revcms )

So I putted
Code:
$antiSulake = new AntiSulake();
at global.php here:
64d61aab2bba526eb8d6a82bef166ca0.png


And then I putted
Code:
require_once 'antisulake.php';
here:
70ebd475fb041f230fdbab8038498044.png


And I putted antisulake.php at home directory here
7529c691f2dcd1b62d9a694afa84b525.png
 

Jayseanp

Soooo Bored!
Oct 26, 2013
394
37
Pretty nice release , but to be honest i think we can survive without this lol , fresh has been up for about 1-2 years , habboon , zaps back , xens back , boon has been up for a while so if im correct sulake isnt taking action on the retros its most probably the vps provider.
 

Tietoturpa

New Member
Sep 29, 2012
12
0
Pretty nice release , but to be honest i think we can survive without this lol , fresh has been up for about 1-2 years , habboon , zaps back , xens back , boon has been up for a while so if im correct sulake isnt taking action on the retros its most probably the vps provider.
In finland they've taken action since the most popular finnish retro called ''Prohotelli'' closed. Since then they've taken action on new retros.
 

Users who are viewing this thread

Top