This repository has been archived by the owner on Apr 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
434 changed files
with
61,945 additions
and
17,442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
<?php | ||
|
||
require('../system.php'); | ||
|
||
if (empty($_GET['user']) or empty($_GET['serverId'])) { | ||
vtxtlog("[checkserver.php] checkserver process [GET parameter empty] [ ".((empty($_GET['user']))? 'LOGIN ':'').((empty($_GET['serverId']))? 'SERVERID ':'')."]"); | ||
exit('NO'); | ||
vtxtlog("[checkserver.php] checkserver process [GET parameter empty] [ ".((empty($_GET['user'])) ? 'LOGIN ' : '').((empty($_GET['serverId'])) ? 'SERVERID ' : '')."]"); | ||
exit('NO'); | ||
} | ||
loadTool('user.class.php'); | ||
$db = new DB(); | ||
$db->connect('checkserver'); | ||
|
||
$user = $_GET['user']; | ||
$serverid = $_GET['serverId']; | ||
|
||
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $user) or !preg_match("/^[a-z0-9_-]+$/", $serverid)) { | ||
|
||
vtxtlog("[checkserver.php] error checkserver process [info login ".$user." serverid ".$serverid."]"); | ||
exit('NO'); | ||
} | ||
loadTool('user.class.php'); | ||
BDConnect('checkserver'); | ||
|
||
$user = $_GET['user']; | ||
$serverid = $_GET['serverId']; | ||
|
||
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $user) or | ||
!preg_match("/^[a-z0-9_-]+$/", $serverid)) { | ||
|
||
vtxtlog("[checkserver.php] error checkserver process [info login ".$user." serverid ".$serverid."]"); | ||
exit('NO'); | ||
} | ||
|
||
$result = BD("SELECT `{$bd_users['login']}` FROM {$bd_names['users']} WHERE `{$bd_users['login']}`='".TextBase::SQLSafe($user)."' AND `{$bd_users['server']}`='".TextBase::SQLSafe($serverid)."'"); | ||
|
||
if( mysql_num_rows($result) == 1 ){ | ||
|
||
$user_login = new User($user,$bd_users['login']); | ||
$user_login->gameLoginConfirm(); | ||
vtxtlog("[checkserver.php] Server Test [Success]"); | ||
exit('YES'); | ||
} | ||
|
||
vtxtlog("[checkserver.php] [User not found] User [$user] Server ID [$serverid]"); | ||
exit('NO'); | ||
|
||
$result = $db->execute("SELECT `{$bd_users['login']}` FROM {$bd_names['users']} WHERE `{$bd_users['login']}`='".$db->safe($user)."' AND `{$bd_users['server']}`='".$db->safe($serverid)."'"); | ||
|
||
if ($db->num_rows($result) == 1) { | ||
|
||
$user_login = new User($user, $bd_users['login']); | ||
$user_login->gameLoginConfirm(); | ||
vtxtlog("[checkserver.php] Server Test [Success]"); | ||
exit('YES'); | ||
} | ||
|
||
vtxtlog("[checkserver.php] [User not found] User [$user] Server ID [$serverid]"); | ||
exit('NO'); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
<?php | ||
if(!defined('INCLUDE_CHECK')) die("You don't have permissions to run this"); | ||
/* Метод хеширования пароля для интеграции с различними плагинами/сайтами/cms/форумами | ||
'hash_md5' - md5 хеширование | ||
'hash_authme' - интеграция с плагином AuthMe | ||
'hash_cauth' - интеграция с плагином Cauth | ||
'hash_xauth' - интеграция с плагином xAuth | ||
'hash_joomla' - интеграция с Joomla (v1.6- v1.7) | ||
'hash_ipb' - интеграция с IPB | ||
'hash_xenforo' - интеграция с XenForo | ||
'hash_wordpress' - интеграция с WordPress | ||
'hash_vbulletin' - интеграция с vBulletin | ||
'hash_dle' - интеграция с DLE | ||
'hash_drupal' - интеграция с Drupal (v.7) | ||
'hash_launcher' - интеграция с лаунчером sashok724 (Регистрация через лаунчер) | ||
*/ | ||
require('../system.php'); | ||
BDConnect('auth'); | ||
$crypt = 'hash_md5'; | ||
|
||
$db_host = $config['db_host']; // Ip-адрес MySQL | ||
$db_port = $config['db_port']; // Порт базы данных | ||
$db_user = $config['db_login']; // Пользователь базы данных | ||
$db_pass = $config['db_passw']; // Пароль базы данных | ||
$db_database = $config['db_name']; //База данных | ||
|
||
$db_table = $bd_names['users']; //Таблица с пользователями | ||
$db_group = $bd_users['group']; //Для webmcr (минификс) | ||
$db_columnId = $bd_users['id']; //Колонка с ID пользователей | ||
$db_columnUser = $bd_users['login']; //Колонка с именами пользователей | ||
$db_columnPass = $bd_users['password']; //Колонка с паролями пользователей | ||
$db_tableOther = 'xf_user_authenticate'; //Дополнительная таблица для XenForo, не трогайте | ||
$db_columnSesId = $bd_users['session']; //Колонка с сессиями пользователей, не трогайте | ||
$db_columnServer = $bd_users['server']; //Колонка с серверами пользователей, не трогайтe | ||
$db_columnSalt = 'members_pass_salt'; //Настраивается для IPB и vBulletin: , IPB - members_pass_salt, vBulletin - salt | ||
$db_columnIp = $bd_users['ip']; //Колонка с IP пользователей | ||
|
||
$db_columnDatareg = $bd_users['ctime']; // Колонка даты регистрации | ||
$db_columnMail = $bd_users['email']; // Колонка mail | ||
|
||
$masterversion = sqlConfigGet('launcher-version'); //Мастер-версия лаунчера | ||
$protectionKey = sqlConfigGet('protection-key'); //Ключ защиты сессии. Никому его не говорите. | ||
if (!defined('INCLUDE_CHECK')) | ||
die("You don't have permissions to run this"); | ||
/* Метод хеширования пароля для интеграции с различними плагинами/сайтами/cms/форумами | ||
'hash_md5' - md5 хеширование | ||
'hash_authme' - интеграция с плагином AuthMe | ||
'hash_cauth' - интеграция с плагином Cauth | ||
'hash_xauth' - интеграция с плагином xAuth | ||
'hash_joomla' - интеграция с Joomla (v1.6- v1.7) | ||
'hash_ipb' - интеграция с IPB | ||
'hash_xenforo' - интеграция с XenForo | ||
'hash_wordpress' - интеграция с WordPress | ||
'hash_vbulletin' - интеграция с vBulletin | ||
'hash_dle' - интеграция с DLE | ||
'hash_drupal' - интеграция с Drupal (v.7) | ||
'hash_launcher' - интеграция с лаунчером sashok724 (Регистрация через лаунчер) | ||
*/ | ||
require('../system.php'); | ||
$db = new DB(); | ||
$db->connect('auth'); | ||
$crypt = 'hash_md5'; | ||
|
||
$usecheck = true; //Можно ли использовать регистрацию в лаунчере | ||
$db_host = $config['db_host']; // Ip-адрес MySQL | ||
$db_port = $config['db_port']; // Порт базы данных | ||
$db_user = $config['db_login']; // Пользователь базы данных | ||
$db_pass = $config['db_passw']; // Пароль базы данных | ||
$db_database = $config['db_name']; //База данных | ||
|
||
$db_table = $bd_names['users']; //Таблица с пользователями | ||
$db_group = $bd_users['group']; //Для webmcr (минификс) | ||
$db_columnId = $bd_users['id']; //Колонка с ID пользователей | ||
$db_columnUser = $bd_users['login']; //Колонка с именами пользователей | ||
$db_columnPass = $bd_users['password']; //Колонка с паролями пользователей | ||
$db_tableOther = 'xf_user_authenticate'; //Дополнительная таблица для XenForo, не трогайте | ||
$db_columnSesId = $bd_users['session']; //Колонка с сессиями пользователей, не трогайте | ||
$db_columnServer = $bd_users['server']; //Колонка с серверами пользователей, не трогайтe | ||
$db_columnSalt = 'members_pass_salt'; //Настраивается для IPB и vBulletin: , IPB - members_pass_salt, vBulletin - salt | ||
$db_columnIp = $bd_users['ip']; //Колонка с IP пользователей | ||
|
||
$db_columnDatareg = $bd_users['ctime']; // Колонка даты регистрации | ||
$db_columnMail = $bd_users['email']; // Колонка mail | ||
|
||
$masterversion = sqlConfigGet('launcher-version'); //Мастер-версия лаунчера | ||
$protectionKey = sqlConfigGet('protection-key'); //Ключ защиты сессии. Никому его не говорите. | ||
|
||
$usecheck = true; //Можно ли использовать регистрацию в лаунчере | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
<?php | ||
error_reporting(0); | ||
define('INCLUDE_CHECK',true); | ||
include ("connect.php"); | ||
@$user = mysql_real_escape_string($_GET['username']); | ||
@$serverid = mysql_real_escape_string($_GET['serverId']); | ||
|
||
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $user) || !preg_match("/^[a-zA-Z0-9_-]+$/", $serverid)){ | ||
error_reporting(0); | ||
define('INCLUDE_CHECK', true); | ||
include("connect.php"); | ||
@$user = $db->safe($_GET['username']); | ||
@$serverid = $db->safe($_GET['serverId']); | ||
|
||
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $user) || !preg_match("/^[a-zA-Z0-9_-]+$/", $serverid)) { | ||
|
||
echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
|
||
echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
|
||
exit; | ||
} | ||
} | ||
|
||
$query = $db->execute("Select $db_columnUser From $db_table Where $db_columnUser='$user'") or die ("Ошибка"); | ||
$row = $db->fetch_assoc($query); | ||
$realUser = $row[$db_columnUser]; | ||
|
||
$query = mysql_query("Select $db_columnUser From $db_table Where $db_columnUser='$user'") or die ("Ошибка"); | ||
$row = mysql_fetch_assoc($query); | ||
$realUser = $row[$db_columnUser]; | ||
if ($user !== $realUser) { | ||
exit ('{"error":"Bad login","errorMessage":"Bad login"}'); | ||
} | ||
|
||
if ($user !== $realUser) | ||
{ | ||
exit ('{"error":"Bad login","errorMessage":"Bad login"}'); | ||
} | ||
|
||
$result = mysql_query("Select $db_columnUser From $db_table Where $db_columnUser='$user' And $db_columnServer='$serverid'") or die (mysql_error()); | ||
$result = $db->execute("Select $db_columnUser From $db_table Where $db_columnUser='$user' And $db_columnServer='$serverid'") or die ($db->error()); | ||
|
||
if(mysql_num_rows($result) == 1) echo '{"id":"ok"}'; | ||
else echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
if ($db->num_rows($result) == 1) | ||
echo '{"id":"ok"}'; else echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,39 @@ | ||
<?php | ||
define('INCLUDE_CHECK',true); | ||
define('INCLUDE_CHECK', true); | ||
include("connect.php"); | ||
//include("loger.php"); | ||
if (($_SERVER['REQUEST_METHOD'] == 'POST' ) && (stripos($_SERVER["CONTENT_TYPE"], "application/json") === 0)) { | ||
$json = json_decode($HTTP_RAW_POST_DATA); | ||
|
||
if (($_SERVER['REQUEST_METHOD'] == 'POST') && (stripos($_SERVER["CONTENT_TYPE"], "application/json") === 0)) { | ||
$json = json_decode($HTTP_RAW_POST_DATA); | ||
} else { | ||
|
||
} | ||
|
||
@$aT = $json->accessToken; @$sP = @$json->selectedProfile; @$sI = $json->serverId; | ||
@$user = mysql_real_escape_string($aT); | ||
@$sessionid = mysql_real_escape_string($sP); | ||
@$serverid = mysql_real_escape_string($sI); | ||
@$aT = $json->accessToken; | ||
@$sP = @$json->selectedProfile; | ||
@$sI = $json->serverId; | ||
@$user = $db->safe($aT); | ||
@$sessionid = $db->safe($sP); | ||
@$serverid = $db->safe($sI); | ||
//$logger->WriteLine($user.' '.$sessionid.' '.$serverid); | ||
|
||
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $user) || !preg_match("/^[a-zA-Z0-9:_-]+$/", $sessionid) || !preg_match("/^[a-zA-Z0-9_-]+$/", $serverid)){ | ||
if (!preg_match("/^[a-zA-Z0-9_-]+$/", $user) || !preg_match("/^[a-zA-Z0-9:_-]+$/", $sessionid) || !preg_match("/^[a-zA-Z0-9_-]+$/", $serverid)) { | ||
|
||
echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
exit; | ||
echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
exit; | ||
} | ||
|
||
$query = mysql_query("Select $db_columnUser From $db_table Where $db_columnUser='$user'") or die ("Ошибка"); | ||
$row = mysql_fetch_assoc($query); | ||
$realUser = $row[$db_columnUser]; | ||
|
||
if ($user !== $realUser) | ||
{ | ||
exit ('{"error":"Bad login","errorMessage":"Bad login"}'); | ||
} | ||
|
||
$result = mysql_query("Select $db_columnUser From $db_table Where $db_columnSesId='$sessionid' And $db_columnUser='$user' And $db_columnServer='$serverid'") or die ("Ошибка"); | ||
if(mysql_num_rows($result) == 1) echo '{"id":"ok"}'; | ||
else | ||
{ | ||
$result = mysql_query("Update $db_table SET $db_columnServer='$serverid' Where $db_columnSesId='$sessionid' And $db_columnUser='$user'") or die ("Ошибка"); | ||
if(mysql_affected_rows() == 1) echo '{"id":"ok"}'; | ||
else echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
} | ||
$query = $db->execute("Select $db_columnUser From $db_table Where $db_columnUser='$user'") or die ("Ошибка"); | ||
$row = $db->fetch_assoc($query); | ||
$realUser = $row[$db_columnUser]; | ||
|
||
if ($user !== $realUser) { | ||
exit ('{"error":"Bad login","errorMessage":"Bad login"}'); | ||
} | ||
|
||
$result = $db->execute("Select $db_columnUser From $db_table Where $db_columnSesId='$sessionid' And $db_columnUser='$user' And $db_columnServer='$serverid'") or die ("Ошибка"); | ||
if ($db->num_rows($result) == 1) | ||
echo '{"id":"ok"}'; else { | ||
$result = $db->execute("Update $db_table SET $db_columnServer='$serverid' Where $db_columnSesId='$sessionid' And $db_columnUser='$user'") or die ("Ошибка"); | ||
if ($db->affected_rows() == 1) | ||
echo '{"id":"ok"}'; else echo '{"error":"Bad login","errorMessage":"Bad login"}'; | ||
} | ||
?> |
Oops, something went wrong.