<?php//// KUrlLogin.php Joomla authentication script//// Author: Jaka Konda// Plugin: KUrlLogin// Plugin Link: http://dev.bukkit.org/server-mods/kurllogin/// Contact: minecraft@konda.si// base64 must be set to true in config (base64: true)// I recommend that you add IP of your MC server to bottom comented line ( and uncomment)//( if it's on local network, IP will probaby be your default gateway, otherwise// try IP of your MC server directly.//if($_SERVER['REMOTE_ADDR'] != "192.168.1.20") die(0);include('configuration.php');if(isset($_GET['user'])||isset($_GET['exists'])){$_GET['user']=base64_decode(isset($_GET['user'])?$_GET['user']:$_GET['exists']);$cfg=newJConfig;$c=mysql_connect($cfg->host,$cfg->user,$cfg->password);if(!$c)die('0');mysql_select_db($cfg->db,$c);$q=mysql_query("SELECT id, password FROM ".$cfg->dbprefix."users WHERE username = '".mysql_real_escape_string($_GET['user'])."' AND block = 0 AND activation = '' LIMIT 1");while($r=mysql_fetch_assoc($q)){if(isset($_GET['exists']))die('1');$p=explode(':',$r['password']);if(isset($_GET['pass'])){$_GET['pass']=base64_decode($_GET['pass']);if($p[0]==md5($_GET['pass'].$p[1]))echo$r['id'];elseecho'0';}elseecho$r['id'];}die('0');}?>
<?php//// KUrlLogin.php Wordpress authentication script//// Author: Jaka Konda// Plugin: KUrlLogin// Plugin Link: http://dev.bukkit.org/server-mods/kurllogin/// Contact: minecraft@konda.si// base64 must be set to true in config (base64: true)// EXAMPLE URL:// Url: 'http://your.domain.orIP/KUrlLogin(Wordpress).php?user={user}&pass={pass}'// Exists: 'http://your.domain.orIP/KUrlLogin(Wordpress).php?exists={user}'// I recommend that you add IP of your MC server to bottom comented line ( and uncomment)//( if it's on local network, IP will probaby be your default gateway, otherwise// try IP of your MC server directly.//if($_SERVER['REMOTE_ADDR'] != "192.168.1.20") die(0);include('wp-config.php');include('wp-includes/class-phpass.php');if(isset($_GET['user'])||isset($_GET['exists'])){$_GET['user']=base64_decode(isset($_GET['user'])?$_GET['user']:$_GET['exists']);$c=mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);if(!$c)die('0');mysql_select_db(DB_NAME,$c);$q=mysql_query("SELECT ID, user_pass FROM ".$table_prefix."users WHERE user_login = '".mysql_real_escape_string($_GET['user'])."' LIMIT 1");while($r=mysql_fetch_assoc($q)){if(isset($_GET['exists']))die('1');$_GET['pass']=base64_decode($_GET['pass']);$hasher=newPasswordHash(8,TRUE);if(isset($_GET['pass'])){if($hasher->CheckPassword($_GET['pass'],$r['user_pass'])||($r['user_pass']==md5($_GET['pass'])))echo$r['ID'];elseecho'0';}elseecho$r['ID'];}die('0');}?>
Comments
To post a comment, please login or register a new account.
Comments